Class CardinalityConstraint

  • public final class CardinalityConstraint
    extends Object
    A constraint on the number of values a property can have.
    1.3 Usefull constants for whenever you need one of the common cardinalitites. Otherwise, build a Location using the normal Location APIs.:
    Matthew Pocock
    • Field Detail

      • NONE

        public static final Location NONE
        This cardinality contains no intengers, not even zero. It means that there is no way to fulfill this cardinality constraint. It's like Double.NaN
      • ZERO

        public static final Location ZERO
        The property should have zero values. This means that it should be absent.
      • ZERO_OR_ONE

        public static final Location ZERO_OR_ONE
        The property should have zero or one values. This means that it is optional but if present must have exactly one value.
      • ANY

        public static final Location ANY
        The property can have any number of values, including none.
      • ONE

        public static final Location ONE
        The property should have exactly one value.
      • ONE_OR_MORE

        public static final Location ONE_OR_MORE
        The property should have one or more values. It can not be absent.