|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.util.version.ReleaseIdRange
ReleaseIdRange contains a Range and provides methods for creating the various combinations of range types.
wt.util.Range
Field Summary | |
private String |
assemblyId_
|
private int |
cachedHashCode_
|
static String |
EXCLUSIVE_FROM_RANGE_ATTRIBUTE_NAME
|
static String |
EXCLUSIVE_TO_RANGE_ATTRIBUTE_NAME
|
static String |
INCLUSIVE_FROM_RANGE_ATTRIBUTE_NAME
|
static String |
INCLUSIVE_TO_RANGE_ATTRIBUTE_NAME
|
private boolean |
needToComputeHashCode_
|
private Range |
range_
|
static String |
VERSION_RANGE_ELEMENT_NAME
|
Constructor Summary | |
private |
ReleaseIdRange(Range range)
Constructs the ReleaseIdRange from a Range constructed from a low and high ReleaseId. |
Method Summary | |
Element |
asDom(Document dom_factory)
Produce a DOM fragment that looks like: |
boolean |
contains(ReleaseId version)
Returns true if the given version is contained in the range for this ReleaseId. |
static ReleaseIdRange |
createFrom(Element version_range_element)
Create a ReleaseIdRange from a DOM fragment that looks like: |
static ReleaseIdRange |
createFrom(ReleaseId lower,
boolean lower_inclusive,
ReleaseId upper,
boolean upper_inclusive)
A generic factory method that allows you to provide a null upper or lower version (not both) and allows your to parameterize the inclusiveness of each end point. |
boolean |
equals(Object other)
|
ReleaseId |
getLowerBound()
The version that is the lower boundary point. |
ReleaseId |
getUpperBound()
The version that is the upper boundary point. |
int |
hashCode()
|
boolean |
isLowerBoundInclusive()
Whether or not the range's lower bound is inclusive. |
boolean |
isUpperBoundInclusive()
Whether or not the range's upper bound is inclusive. |
static ReleaseIdRange |
newExcludeLowExcludeHigh(ReleaseId low,
ReleaseId high)
Conceptually, using numbers: (low, high) |
static ReleaseIdRange |
newExcludeLowIncludeHigh(ReleaseId low,
ReleaseId high)
Conceptually, using numbers: (low, high] |
static ReleaseIdRange |
newExcludeLowUnboundedHigh(ReleaseId low)
Conceptually, using numbers: (low, infinity) |
static ReleaseIdRange |
newIncludeLowExcludeHigh(ReleaseId low,
ReleaseId high)
Conceptually, using numbers: [low, high) |
static ReleaseIdRange |
newIncludeLowIncludeHigh(ReleaseId low,
ReleaseId high)
Conceptually, using numbers: [low, high] |
static ReleaseIdRange |
newIncludeLowUnboundedHigh(ReleaseId low)
Conceptually, using numbers: [low, infinity) |
static ReleaseIdRange |
newUnboundedLowExcludeHigh(ReleaseId high)
Conceptually, using numbers: (-infinity, high) |
static ReleaseIdRange |
newUnboundedLowIncludeHigh(ReleaseId high)
Conceptually, using numbers: (-infinity, high] |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String VERSION_RANGE_ELEMENT_NAME
public static final String INCLUSIVE_FROM_RANGE_ATTRIBUTE_NAME
public static final String EXCLUSIVE_FROM_RANGE_ATTRIBUTE_NAME
public static final String INCLUSIVE_TO_RANGE_ATTRIBUTE_NAME
public static final String EXCLUSIVE_TO_RANGE_ATTRIBUTE_NAME
private String assemblyId_
private Range range_
private boolean needToComputeHashCode_
private int cachedHashCode_
Constructor Detail |
private ReleaseIdRange(Range range)
Method Detail |
public static ReleaseIdRange createFrom(ReleaseId lower, boolean lower_inclusive, ReleaseId upper, boolean upper_inclusive) throws RangeException
RangeException
public static ReleaseIdRange newIncludeLowIncludeHigh(ReleaseId low, ReleaseId high) throws RangeException, ReleaseIdException
RangeException
ReleaseIdException
public static ReleaseIdRange newIncludeLowExcludeHigh(ReleaseId low, ReleaseId high) throws RangeException
RangeException
public static ReleaseIdRange newExcludeLowIncludeHigh(ReleaseId low, ReleaseId high) throws RangeException
RangeException
public static ReleaseIdRange newExcludeLowExcludeHigh(ReleaseId low, ReleaseId high) throws RangeException
RangeException
public static ReleaseIdRange newIncludeLowUnboundedHigh(ReleaseId low) throws RangeException
RangeException
public static ReleaseIdRange newExcludeLowUnboundedHigh(ReleaseId low) throws RangeException
RangeException
public static ReleaseIdRange newUnboundedLowIncludeHigh(ReleaseId high) throws RangeException
RangeException
public static ReleaseIdRange newUnboundedLowExcludeHigh(ReleaseId high) throws RangeException
RangeException
public boolean contains(ReleaseId version)
public Element asDom(Document dom_factory)
<ReleaseIdRange from="a.b.c" to="d.e.f"/>If the range is exclusive on either end, the
from
and
to
, change to exFrom
and exTo
respectively. If the range is unbounded on one end, the appropriate
from
or to
attribute will be absent.
public static ReleaseIdRange createFrom(Element version_range_element) throws RangeException, ReleaseIdException
<ReleaseIdRange from="a.b.c" to="d.e.f"/>The end points are inclusive as specified above. Changing the
from
or to
attributes to
exFrom
or exTo
respectively will
make the end points exclusive.
To define an unbounded range (in one direction only), ommit the
appropriate from/exFrom
or to/exTo
attribute.
RangeException
ReleaseIdException
public ReleaseId getLowerBound()
public boolean isLowerBoundInclusive()
public ReleaseId getUpperBound()
public boolean isUpperBoundInclusive()
public String toString()
public boolean equals(Object other)
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |