krysalis-version/src/java/org/krysalis/version/internal/data/util VersionDataComparison.java,1.6,1.7

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

Modified Files:
	VersionDataComparison.java 
Log Message:
Docs & also Constraints

Index: VersionDataComparison.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/internal/data/util/VersionDataComparison.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** VersionDataComparison.java	17 Feb 2003 06:27:26 -0000	1.6
--- VersionDataComparison.java	17 Feb 2003 18:54:53 -0000	1.7
***************
*** 70,95 ****
      public static final int TYPE_LESS_THAN_OR_EQUAL = 2;
      public static final int TYPE_EQUAL = 3;
!     public static final int TYPE_NOT_EQUAL = 4;
!     public static final int TYPE_GREATER_THAN = 5;
!     public static final int TYPE_GREATER_THAN_OR_EQUAL = 6;
  
-     /*public static final VersionDataComparison UNSET =
-         new VersionDataComparison(TYPE_UNSET);
-     
-     public static final VersionDataComparison LESS_THAN =
-         new VersionDataComparison(TYPE_LESS_THAN);
-     
-     public static final VersionDataComparison LESS_THAN_OR_EQUAL =
-         new VersionDataComparison(TYPE_LESS_THAN_OR_EQUAL);
-     
-     public static final VersionDataComparison EQUAL =
-         new VersionDataComparison(TYPE_EQUAL);
-     
-     public static final VersionDataComparison GREATER_THAN =
-         new VersionDataComparison(TYPE_GREATER_THAN);
-     
-     public static final VersionDataComparison GREATER_THAN_OR_EQUAL =
-         new VersionDataComparison(TYPE_GREATER_THAN_OR_EQUAL);
-     */
      private int m_type = TYPE_UNSET;
      private VersionData m_comparisonData = null;
--- 70,78 ----
      public static final int TYPE_LESS_THAN_OR_EQUAL = 2;
      public static final int TYPE_EQUAL = 3;
!     public static final int TYPE_COMPATIBLE_WITH = 4;
!     public static final int TYPE_NOT_EQUAL = 5;
!     public static final int TYPE_GREATER_THAN = 6;
!     public static final int TYPE_GREATER_THAN_OR_EQUAL = 7;
  
      private int m_type = TYPE_UNSET;
      private VersionData m_comparisonData = null;
***************
*** 147,150 ****
--- 130,137 ----
      }
  
+     public static boolean isCompatibleWith(VersionDataComparison comp) {
+         return TYPE_COMPATIBLE_WITH == comp.m_type;
+     }
+ 
      public static boolean isLessThan(VersionDataComparison comp) {
          return TYPE_LESS_THAN == comp.m_type;
***************
*** 256,259 ****
--- 243,252 ----
                  }
  
+             case TYPE_COMPATIBLE_WITH :
+                {
+                    representation = "~";
+                    break;
+                }
+ 
              case TYPE_NOT_EQUAL :
                  {
***************
*** 311,314 ****
--- 304,313 ----
                  }
  
+             case TYPE_COMPATIBLE_WITH :
+                 {
+                     representation = "CompatibleWith";
+                     break;
+                 }
+ 
              case TYPE_NOT_EQUAL :
                  {
***************
*** 344,347 ****
--- 343,348 ----
          else if ("=".equals(type) || "EqualTo".equalsIgnoreCase(type))
              typeVal = TYPE_EQUAL;
+         else if ("~".equals(type) || "CompatibleWith".equalsIgnoreCase(type))
+             typeVal = TYPE_COMPATIBLE_WITH;
          else if ("!=".equals(type) || "NotEqualTo".equalsIgnoreCase(type))
              typeVal = TYPE_NOT_EQUAL;




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
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.