Class FilteredAttributes

    • Field Detail

      • sourceData

        private final java.lang.Object[] sourceData
      • hashcode

        private final int hashcode
      • size

        private final int size
    • Constructor Detail

      • FilteredAttributes

        private FilteredAttributes​(java.lang.Object[] sourceData,
                                   int hashcode,
                                   int size)
    • Method Detail

      • create

        static Attributes create​(Attributes source,
                                 java.util.Set<AttributeKey<?>> includedKeys)
        Create a FilteredAttributes instance.
        Parameters:
        source - the source attributes, which SHOULD be based on the standard ImmutableKeyValuePairs. If not, the source will first be converted to the standard implementation.
        includedKeys - the set of attribute keys to include in the output.
      • convertToStandardImplementation

        private static Attributes convertToStandardImplementation​(Attributes source)
      • forEach

        public void forEach​(java.util.function.BiConsumer<? super AttributeKey<?>,​? super java.lang.Object> consumer)
        Description copied from interface: Attributes
        Iterates over all the key-value pairs of attributes contained by this instance.
        Specified by:
        forEach in interface Attributes
      • size

        public int size()
        Description copied from interface: Attributes
        The number of attributes contained in this.
        Specified by:
        size in interface Attributes
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: Attributes
        Whether there are any attributes contained in this.
        Specified by:
        isEmpty in interface Attributes
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • includeIndexInOutput

        abstract boolean includeIndexInOutput​(int sourceIndex)