public class DeweyNumber extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
DeweyNumber.DeweyNumberSerializer
A
TypeSerializer for the DeweyNumber which serves as a version number. |
Constructor and Description |
---|
DeweyNumber(DeweyNumber number) |
DeweyNumber(int start) |
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.
|
DeweyNumber |
increase(int times)
Creates a new dewey number from this such that its last digit is increased by the supplied
number
|
boolean |
isCompatibleWith(DeweyNumber other)
Checks whether this dewey number is compatible to the other dewey number.
|
int |
length() |
String |
toString() |
public DeweyNumber(int start)
public DeweyNumber(DeweyNumber number)
public boolean isCompatibleWith(DeweyNumber other)
other
- The other dewey number to check compatibility againstpublic int length()
public DeweyNumber increase()
public DeweyNumber increase(int times)
times
- how many times to increase the Dewey numberpublic DeweyNumber addStage()
public static DeweyNumber fromString(String deweyNumberString)
deweyNumberString
- Dot separated string of integersCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.