EcNumber.Impl
EC_PATTERN, UNCLASSIFIED, UNDEFINED
Constructor and Description |
---|
Impl(int mainClass,
int subClass,
int subSubClass,
int group)
Make a new EcNumber.Impl with the data provided.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getClassNumber(int level)
Get the class number associated with the particular level of the ec number.
|
int |
hashCode() |
java.lang.String |
toString() |
static EcNumber.Impl |
valueOf(java.lang.String ecString)
Process a string into an EcNumber.
|
public Impl(int mainClass, int subClass, int subSubClass, int group)
mainClass
- the main class numbersubClass
- the sub class numbersubSubClass
- the sub-sub class numbergroup
- the group numberpublic int getClassNumber(int level)
EcNumber
The index can be between 0 and 3 inclusive. 0 correxpons to the top level class, 1 to the sub-class and so on. A return value of UNDEFINED indicates that this field is not populated.
getClassNumber
in interface EcNumber
level
- the level in the ec classification to return the number forpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static EcNumber.Impl valueOf(java.lang.String ecString)
This method uses the EcNumber.EC_PATTERN
regular expression.
ecString
- String to parsejava.lang.IllegalArgumentException
- if ecString could not be parsed