Class UnlimitedInteger

java.lang.Object
org.apache.sis.internal.jaxb.gco.UnlimitedInteger

final class UnlimitedInteger extends Object
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
    Modifier and Type
    Field
    Description
    private Boolean
    Whether the value should be considered infinite.
    private Integer
    The value, limited to 32 bits integer for now.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new gco:UnlimitedInteger for a missing value.
    UnlimitedInteger(Integer value, boolean inclusive)
    Creates a new gco:UnlimitedInteger for the given value.
  • Method Summary

    Modifier and Type
    Method
    Description
    private Boolean
    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.
    Returns a string representation for debugging purpose only.
    (package private) final Integer
    Returns the value, or null if the value is infinite.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • value

      private Integer value
      The value, limited to 32 bits integer for now. A null value is interpreted as missing value, unless isInfinite is true.
    • isInfinite

      private Boolean isInfinite
      Whether the value should be considered infinite. An infinite value implies xsi:nil = true.
  • Constructor Details

    • UnlimitedInteger

      UnlimitedInteger()
      Creates a new gco:UnlimitedInteger for a missing value.
    • UnlimitedInteger

      UnlimitedInteger(Integer value, boolean inclusive)
      Creates a new gco: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

      final Integer value()
      Returns the value, or null if the value is infinite. This method does not verify if the value is valid (non-nil).
    • getNil

      private Boolean getNil()
      Returns whether the value should be considered unspecified. An infinite value is considered nil. This method never returns false; if the value is not nil, then null is returned.
    • setNil

      private void setNil(Boolean nil)
      Sets whether the value should be considered unspecified. This method is invoked by JAXB at unmarshalling time.
    • toString

      public String toString()
      Returns a string representation for debugging purpose only.
      Overrides:
      toString in class Object