krysalis-version/src/java/org/krysalis/version/loading VersionLoadContext.java,1.2,1.3

[email protected]
Newsgroups gmane.comp.krysalis.sandbox
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/loading
In directory sc8-pr-cvs1:/tmp/cvs-serv27795/src/java/org/krysalis/version/loading

Modified Files:
	VersionLoadContext.java 
Log Message:
Prettier

Index: VersionLoadContext.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/loading/VersionLoadContext.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** VersionLoadContext.java	7 Feb 2003 20:11:49 -0000	1.2
--- VersionLoadContext.java	14 Feb 2003 21:12:01 -0000	1.3
***************
*** 68,173 ****
   */
  public class VersionLoadContext implements Comparable {
!     private VersionIdentifier m_identifier = null;
!     private AnnotationScratchpad m_annotations = null;
  
!     private Version m_version = null;
  
!     // :TODO: Do we wish to store history on "failed attempts"?
!     //	:TODO: And what is NOT loaded?	
!     //	private Throwable m_issue	=	null;
  
!     public VersionLoadContext(
!         AnnotationScratchpad pad,
!         VersionIdentifier identifier,
!         Version version) {
!         m_annotations = pad;
!         m_identifier = identifier;
!         m_version = version;
!     }
  
!     /**
!      * Returns the version.
!      * @return Version
!      */
!     public Version getVersion() {
!         return m_version;
!     }
  
!     /**
!      * Returns the identifier.
!      * @return VersionIdentifier
!      */
!     public VersionIdentifier getIdentifier() {
!         return m_identifier;
!     }
  
!     /**
!      * Sets the identifier.
!      * @param identifier The identifier to set
!      */
!     public void setIdentifier(VersionIdentifier identifier) {
!         m_identifier = identifier;
!     }
  
!     //public void annotate(Object note) {
!     //    if (null == m_annotations)
!     //        m_annotations = new AnnotationScratchpad();
! //
!      //   m_annotations.add(note);
!    // }
  
!     public boolean hasAnnotations() {
!         return ((null != m_annotations) && m_annotations.hasAnnotations());
!     }
  
!     /**
!      * Returns the annotations.
!      * @return AnnotationScratchpad
!      */
!     public AnnotationScratchpad getAnnotations() {
!         return m_annotations;
!     }
  
! //:TODO: equals/hashCode
!     /**
!      * @see Object#equals(Object)
!      */
!     public int compareTo(Object other) {
!         int comparison = -1;
  
!          if (other instanceof VersionLoadContext) {
!              VersionLoadContext otherContext = (VersionLoadContext) other;
  
!             comparison = (otherContext.m_identifier.compareTo(m_identifier));
!         }
!         else
!             throw new IllegalArgumentException(
!                 "Not a VersionIdentifier: "
!                     + other.getClass()
!                     + " : "
!                     + other.toString());
  
!         return comparison;
!     }
  
!     public void dump(PrintStream out) {
!         dump(out, 0);
!     }
  
!     public void dump(PrintStream out, int depth) {
!         dump(new PrintWriter(out, true), depth);
!     }
  
!     public void dump(PrintWriter out) {
!         dump(out, 0);
!     }
  
!     public void dump(PrintWriter out, int depth) {
!         out.println("VersionLoadContext" + DebugUtils.getShortName(getClass()));
!         
!         out.println("Identifier: " + m_identifier);
!         
!         if ( null != m_annotations )
!             m_annotations.dump(out,depth+1);
!     }
  }
--- 68,176 ----
   */
  public class VersionLoadContext implements Comparable {
! 	private VersionIdentifier m_identifier = null;
! 	private AnnotationScratchpad m_annotations = null;
  
! 	private Version m_version = null;
  
! 	// :TODO: Do we wish to store history on "failed attempts"?
! 	//	:TODO: And what is NOT loaded?	
! 	//	private Throwable m_issue	=	null;
  
! 	public VersionLoadContext(
! 		AnnotationScratchpad pad,
! 		VersionIdentifier identifier,
! 		Version version) {
! 		m_annotations = pad;
! 		m_identifier = identifier;
! 		m_version = version;
! 	}
  
! 	/**
! 	 * Returns the version.
! 	 * @return Version
! 	 */
! 	public Version getVersion() {
! 		return m_version;
! 	}
  
! 	/**
! 	 * Returns the identifier.
! 	 * @return VersionIdentifier
! 	 */
! 	public VersionIdentifier getIdentifier() {
! 		return m_identifier;
! 	}
  
! 	/**
! 	 * Sets the identifier.
! 	 * @param identifier The identifier to set
! 	 */
! 	public void setIdentifier(VersionIdentifier identifier) {
! 		m_identifier = identifier;
! 	}
  
! 	//public void annotate(Object note) {
! 	//    if (null == m_annotations)
! 	//        m_annotations = new AnnotationScratchpad();
! 	//
! 	//   m_annotations.add(note);
! 	// }
  
! 	public boolean hasAnnotations() {
! 		return ((null != m_annotations) && m_annotations.hasAnnotations());
! 	}
  
! 	/**
! 	 * Returns the annotations.
! 	 * @return AnnotationScratchpad
! 	 */
! 	public AnnotationScratchpad getAnnotations() {
! 		return m_annotations;
! 	}
  
! 	//:TODO: equals/hashCode
! 	/**
! 	 * @see Object#equals(Object)
! 	 */
! 	public int compareTo(Object other) {
! 		int comparison = -1;
  
! 		if (other instanceof VersionLoadContext) {
! 			VersionLoadContext otherContext = (VersionLoadContext) other;
  
! 			comparison = (otherContext.m_identifier.compareTo(m_identifier));
! 		} else
! 			throw new IllegalArgumentException(
! 				"Not a VersionIdentifier: "
! 					+ other.getClass()
! 					+ " : "
! 					+ other.toString());
  
! 		return comparison;
! 	}
  
! 	public String toString() {
! 		return "(" + m_version + ")";
! 	}
  
! 	public void dump(PrintStream out) {
! 		dump(out, 0);
! 	}
  
! 	public void dump(PrintStream out, int depth) {
! 		dump(new PrintWriter(out, true), depth);
! 	}
  
! 	public void dump(PrintWriter out) {
! 		dump(out, 0);
! 	}
! 
! 	public void dump(PrintWriter out, int depth) {
! 		out.println("VersionLoadContext" + DebugUtils.getShortName(getClass()));
! 
! 		out.println("Identifier: " + m_identifier);
! 
! 		if (null != m_annotations)
! 			m_annotations.dump(out, depth + 1);
! 	}
  }




-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.