Package org.apache.sis.internal.jaxb.gco
Class UnlimitedInteger
java.lang.Object
org.apache.sis.internal.jaxb.gco.UnlimitedInteger
The
<gco:UnlimitedInteger>
value, used for MultiplicityRange
implementation.
Despite its name, this UnlimitedInteger
implementation does not handle integers of
arbitrary size. The only difference with an ordinary integer is its capability to express
infinity.- Since:
- 1.0
- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newgco:UnlimitedInteger
for a missing value.UnlimitedInteger
(Integer value, boolean inclusive) Creates a newgco:UnlimitedInteger
for the given value. -
Method Summary
Modifier and TypeMethodDescriptionprivate Boolean
getNil()
Returns whether the value should be considered unspecified.(package private) final boolean
Returns whether the value should be considered infinite.private void
Sets whether the value should be considered unspecified.toString()
Returns a string representation for debugging purpose only.(package private) final Integer
value()
Returns the value, ornull
if the value is infinite.
-
Field Details
-
value
The value, limited to 32 bits integer for now. A null value is interpreted as missing value, unlessisInfinite
istrue
. -
isInfinite
Whether the value should be considered infinite. An infinite value impliesxsi:nil = true
.
-
-
Constructor Details
-
UnlimitedInteger
UnlimitedInteger()Creates a newgco:UnlimitedInteger
for a missing value. -
UnlimitedInteger
UnlimitedInteger(Integer value, boolean inclusive) Creates a newgco:UnlimitedInteger
for the given value. A null value is interpreted as infinity (i.e. no bound).
-
-
Method Details
-
isInfinite
final boolean isInfinite()Returns whether the value should be considered infinite. -
value
Returns the value, ornull
if the value is infinite. This method does not verify if the value is valid (non-nil). -
getNil
Returns whether the value should be considered unspecified. An infinite value is considered nil. This method never returnsfalse
; if the value is not nil, thennull
is returned. -
setNil
Sets whether the value should be considered unspecified. This method is invoked by JAXB at unmarshalling time. -
toString
Returns a string representation for debugging purpose only.
-