com.sun.pkg.client
Class Version.DotSequence

java.lang.Object
  extended by com.sun.pkg.client.Version.DotSequence
All Implemented Interfaces:
java.lang.Comparable<Version.DotSequence>
Enclosing class:
Version

public static class Version.DotSequence
extends java.lang.Object
implements java.lang.Comparable<Version.DotSequence>

The DotSequence class represents the x.y.z parts of a Version object.


Method Summary
 int compareTo(Version.DotSequence d)
           
 boolean equals(java.lang.Object v)
          Compare two DotSequences for equality.
 int hashCode()
           
 boolean isSubsequence(Version.DotSequence d)
          Determine if this DotSequence is a subsequence of another.
 boolean matches(Version.DotSequence d)
           
 java.lang.String toString()
          Returns a string form of the DotSequence.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

equals

public boolean equals(java.lang.Object v)
Compare two DotSequences for equality.

Overrides:
equals in class java.lang.Object
Returns:
True if the two DotSequences are equal

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(Version.DotSequence d)
Specified by:
compareTo in interface java.lang.Comparable<Version.DotSequence>

matches

public boolean matches(Version.DotSequence d)

isSubsequence

public boolean isSubsequence(Version.DotSequence d)
Determine if this DotSequence is a subsequence of another. A Dotsequence is a subsequence of another if the other and this one have identical components, up to the length of this sequence.

Parameters:
d - the Dotsequence to compare
Returns:
true if this DotSequence is a subsequence of d

toString

public java.lang.String toString()
Returns a string form of the DotSequence.

Overrides:
toString in class java.lang.Object
Returns:
a string representing the DotSequence. This are the numbers of the Dotsequence separated by periods.