public interface Generationed<G>
Modifier and Type | Method and Description |
---|---|
int |
compareGeneration(G generation)
Compare the generation of this object with the given generation.
|
int |
compareGeneration(Generationed<G> other)
Compare the generation of this object with the other object.
|
G |
generation()
Get the current generation.
|
void |
setGeneration(G generation)
Set the generation.
|
void setGeneration(G generation)
generation
- the new generation.G generation()
int compareGeneration(Generationed<G> other)
Comparable
but define our own method to avoid the case that users wants to
have a different comparing method along with the generation comparison.other
- another generationed object to compare the generation with.int compareGeneration(G generation)
generation
- the given generation.