|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.interactive_instruments.ShapeChange.StructuredNumber
public class StructuredNumber
This class represents structured integers of the form x.y.z..., where the number of components is determined at object creation time.
Field Summary | |
---|---|
int[] |
components
The component array |
Constructor Summary | |
---|---|
StructuredNumber(int n)
Out-of-integer ctor. |
|
StructuredNumber(String sn)
Out-of-string ctor. |
Method Summary | |
---|---|
int |
compareTo(StructuredNumber sn)
Comparison method. |
StructuredNumber |
createCopy()
|
StructuredNumber |
createCopyWithSuffix(int number)
Creates a copy of this StructuredNumber, appending the given number. |
boolean |
equals(StructuredNumber sn)
Checks if this StructuredNumber is equal to the given one. |
String |
getString()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int[] components
Constructor Detail |
---|
public StructuredNumber(String sn)
sn
- string of the form x.y.zpublic StructuredNumber(int n)
n
- integer valueMethod Detail |
---|
public int compareTo(StructuredNumber sn)
compareTo
in interface Comparable<StructuredNumber>
sn
- other structured number to compare withpublic String getString()
public StructuredNumber createCopyWithSuffix(int number)
number
- the integer to append
public StructuredNumber createCopy()
public boolean equals(StructuredNumber sn)
sn
-
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |