Package com.linecorp.centraldogma.common
Class RevisionRange
java.lang.Object
com.linecorp.centraldogma.common.RevisionRange
-
Constructor Summary
ConstructorDescriptionRevisionRange
(int from, int to) Creates a new instance with the specified integer value offrom
andto
.RevisionRange
(Revision from, Revision to) -
Method Summary
Modifier and TypeMethodDescriptionboolean
from()
Returns thefrom
Revision
.int
hashCode()
boolean
boolean
to()
Returns theto
Revision
.Returns theRevisionRange
whose major value offrom
Revision
is lower than or equal to the major value ofto
Revision
.Returns theRevisionRange
whose major value offrom
Revision
is greater than or equal to the major value ofto
Revision
.toString()
-
Constructor Details
-
RevisionRange
public RevisionRange(int from, int to) Creates a new instance with the specified integer value offrom
andto
. -
RevisionRange
-
-
Method Details
-
from
Returns thefrom
Revision
. -
to
Returns theto
Revision
. -
toAscending
Returns theRevisionRange
whose major value offrom
Revision
is lower than or equal to the major value ofto
Revision
.- Throws:
IllegalStateException
- if thefrom
andto
Revision
s are in the different state. They should be either absolute or relative.
-
toDescending
Returns theRevisionRange
whose major value offrom
Revision
is greater than or equal to the major value ofto
Revision
.- Throws:
IllegalStateException
- if thefrom
andto
Revision
s are in the different state. They should be either absolute or relative.
-
isAscending
public boolean isAscending()- Throws:
IllegalStateException
- if thefrom
andto
Revision
s are in the different state. They should be either absolute or relative.
-
isRelative
public boolean isRelative() -
hashCode
public int hashCode() -
equals
-
toString
-