Interface Attribute

    • Method Detail

      • approximatelyEqualTo

        ConditionResult approximatelyEqualTo​(ByteString assertionValue)
        Indicates whether this attribute has any value(s) that are approximately equal to the provided value.
        Parameters:
        assertionValue - The assertion value for which to make the determination.
        Returns:
        ConditionResult.UNDEFINED if this attribute does not have an approximate matching rule, ConditionResult.TRUE if at least one value is approximately equal to the provided value, or ConditionResult.FALSE otherwise.
      • contains

        boolean contains​(ByteString value)
        Indicates whether this attribute contains the specified value.
        Parameters:
        value - The value for which to make the determination.
        Returns:
        true if this attribute has the specified value, or false if not.
      • containsAll

        boolean containsAll​(Collection<?> values)
        Indicates whether this attribute contains all the values in the collection.
        Parameters:
        values - The set of values for which to make the determination.
        Returns:
        true if this attribute contains all the values in the provided collection, or false if it does not contain at least one of them.
      • matchesEqualityAssertion

        ConditionResult matchesEqualityAssertion​(ByteString assertionValue)
        Indicates whether this attribute matches the specified assertion value.
        Parameters:
        assertionValue - The assertion value for which to make the determination.
        Returns:
        true if this attribute matches the specified assertion value, or false if not.
      • equals

        boolean equals​(Object o)
        Indicates whether the provided object is an attribute that is equal to this attribute. It will be considered equal if the attribute type, set of values, and set of options are equal.
        Overrides:
        equals in class Object
        Parameters:
        o - The object for which to make the determination.
        Returns:
        true if the provided object is an attribute that is equal to this attribute, or false if not.
      • getAttributeDescription

        AttributeDescription getAttributeDescription()
        Retrieves the attribute description for this attribute.
        Returns:
        The attribute description for this attribute.
      • greaterThanOrEqualTo

        ConditionResult greaterThanOrEqualTo​(ByteString assertionValue)
        Indicates whether this attribute has any value(s) that are greater than or equal to the provided value.
        Parameters:
        assertionValue - The assertion value for which to make the determination.
        Returns:
        ConditionResult.UNDEFINED if this attribute does not have an ordering matching rule, ConditionResult.TRUE if at least one value is greater than or equal to the provided assertion value, or ConditionResult.FALSE otherwise.
      • hashCode

        int hashCode()
        Retrieves the hash code for this attribute. It will be calculated as the sum of the hash code for the attribute type and all values.
        Overrides:
        hashCode in class Object
        Returns:
        The hash code for this attribute.
      • isEmpty

        boolean isEmpty()
        Returns true if this attribute contains no attribute values.
        Returns:
        true if this attribute contains no attribute values.
      • isReal

        boolean isReal()
        Indicates whether this is a real attribute (persisted) rather than a virtual attribute (dynamically computed).
        Returns:
        true if this is a real attribute.
      • isVirtual

        boolean isVirtual()
        Indicates whether this is a virtual attribute (dynamically computed) rather than a real attribute (persisted).
        Returns:
        true if this is a virtual attribute.
      • iterator

        Iterator<ByteString> iterator()
        Returns an iterator over the attribute values in this attribute. The attribute values are returned in the order in which they were added this attribute. The returned iterator does not support attribute value removals via Iterator.remove().
        Specified by:
        iterator in interface Iterable<ByteString>
        Returns:
        An iterator over the attribute values in this attribute.
      • lessThanOrEqualTo

        ConditionResult lessThanOrEqualTo​(ByteString assertionValue)
        Indicates whether this attribute has any value(s) that are less than or equal to the provided value.
        Parameters:
        assertionValue - The assertion value for which to make the determination.
        Returns:
        ConditionResult.UNDEFINED if this attribute does not have an ordering matching rule, ConditionResult.TRUE if at least one value is less than or equal to the provided assertion value, or ConditionResult.FALSE otherwise.
      • matchesSubstring

        ConditionResult matchesSubstring​(ByteString subInitial,
                                         List<ByteString> subAny,
                                         ByteString subFinal)
        Indicates whether this attribute has any value(s) that match the provided substring.
        Parameters:
        subInitial - The subInitial component to use in the determination.
        subAny - The subAny components to use in the determination.
        subFinal - The subFinal component to use in the determination.
        Returns:
        ConditionResult.UNDEFINED if this attribute does not have a substring matching rule, ConditionResult.TRUE if at least one value matches the provided substring, or ConditionResult.FALSE otherwise.
      • size

        int size()
        Returns the number of attribute values in this attribute.
        Returns:
        The number of attribute values in this attribute.
      • toString

        String toString()
        Retrieves a one-line string representation of this attribute.
        Overrides:
        toString in class Object
        Returns:
        A one-line string representation of this attribute.
      • toString

        void toString​(StringBuilder buffer)
        Appends a one-line string representation of this attribute to the provided buffer.
        Parameters:
        buffer - The buffer to which the information should be appended.