Class AllOrNoneValueSet

  • All Implemented Interfaces:
    ValueSet, AutoCloseable

    public class AllOrNoneValueSet
    extends Object
    implements ValueSet
    Describes a constraint as a ValueSet which can have one of several states: 1. No value can match 2. Only NULL values can match 3. Only non-null values can match 4. All values can match
    See Also:
    ValueSet
    • Constructor Detail

      • AllOrNoneValueSet

        public AllOrNoneValueSet​(org.apache.arrow.vector.types.pojo.ArrowType type,
                                 boolean all,
                                 boolean nullAllowed)
        Constructs a new AllOrNoneValueSet.
        Parameters:
        type - The Apache Arrow type of the field that this ValueSet applies to.
        all - True if all non-null values are in this ValueSet.
        nullAllowed - True is all null values are in this ValueSet.
    • Method Detail

      • isNullAllowed

        public boolean isNullAllowed()
        Conveys if nulls should be allowed.
        Specified by:
        isNullAllowed in interface ValueSet
        Returns:
        True if NULLs satisfy this constraint, false otherwise.
        See Also:
        ValueSet
      • getType

        public org.apache.arrow.vector.types.pojo.ArrowType getType()
        The Arrow Type of the field this constraint applies to.
        Specified by:
        getType in interface ValueSet
        Returns:
        The ArrowType of the field this ValueSet applies to.
        See Also:
        ValueSet
      • isNone

        public boolean isNone()
        Conveys if no value can satisfy this ValueSet.
        Specified by:
        isNone in interface ValueSet
        Returns:
        True if no value can satisfy this ValueSet, false otherwise.
        See Also:
        ValueSet
      • isAll

        public boolean isAll()
        Conveys if any value can satisfy this ValueSet.
        Specified by:
        isAll in interface ValueSet
        Returns:
        True if any value can satisfy this ValueSet, false otherwise.
        See Also:
        ValueSet
      • isSingleValue

        public boolean isSingleValue()
        Conveys if this ValueSet contains a single value.
        Specified by:
        isSingleValue in interface ValueSet
        Returns:
        True if this ValueSet contains only a single value.
      • getSingleValue

        public Object getSingleValue()
        Attempts to return the single value contained in this ValueSet.
        Specified by:
        getSingleValue in interface ValueSet
        Returns:
        AllOrNoneValueSet never contains a single value, hence this method always throws UnsupportedOperationException.
      • containsValue

        public boolean containsValue​(Marker value)
        Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.
        Specified by:
        containsValue in interface ValueSet
        Parameters:
        value - The value to test in the form of a Marker.
        Returns:
        True if the value is contained in the ValueSet, False otherwise.
      • containsValue

        public boolean containsValue​(Object value)
        Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.
        Specified by:
        containsValue in interface ValueSet
        Parameters:
        value - The value to test in the form of a Marker.
        Returns:
        True if the value is contained in the ValueSet, False otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object