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:UnlimitedIntegerfor a missing value.UnlimitedInteger(Integer value, boolean inclusive) Creates a newgco:UnlimitedIntegerfor the given value. -
Method Summary
Modifier and TypeMethodDescriptionprivate BooleangetNil()Returns whether the value should be considered unspecified.(package private) final booleanReturns whether the value should be considered infinite.private voidSets whether the value should be considered unspecified.toString()Returns a string representation for debugging purpose only.(package private) final Integervalue()Returns the value, ornullif the value is infinite.
-
Field Details
-
value
The value, limited to 32 bits integer for now. A null value is interpreted as missing value, unlessisInfiniteistrue. -
isInfinite
Whether the value should be considered infinite. An infinite value impliesxsi:nil = true.
-
-
Constructor Details
-
UnlimitedInteger
UnlimitedInteger()Creates a newgco:UnlimitedIntegerfor a missing value. -
UnlimitedInteger
UnlimitedInteger(Integer value, boolean inclusive) Creates a newgco:UnlimitedIntegerfor 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, ornullif 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, thennullis 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.
-