public class DeweyNumber extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
|
DeweyNumber(int start) |
protected |
DeweyNumber(int[] deweyNumber) |
Modifier and Type | Method and Description |
---|---|
DeweyNumber |
addStage()
Creates a new dewey number from this such that a 0 is appended as new last digit.
|
boolean |
equals(Object obj) |
static DeweyNumber |
fromString(String deweyNumberString)
Creates a dewey number from a string representation.
|
int |
hashCode() |
DeweyNumber |
increase()
Creates a new dewey number from this such that its last digit is increased by
one.
|
boolean |
isCompatibleWith(DeweyNumber other)
Checks whether this dewey number is compatible to the other dewey number.
|
int |
length() |
String |
toString() |
public DeweyNumber(int start)
protected DeweyNumber(int[] deweyNumber)
public boolean isCompatibleWith(DeweyNumber other)
other
- The other dewey number to check compatibility againstpublic int length()
public DeweyNumber increase()
public DeweyNumber addStage()
public static DeweyNumber fromString(String deweyNumberString)
deweyNumberString
- Dot separated string of integersCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.