Class ExcludeFieldEnumSelector

  • All Implemented Interfaces:
    FieldSelector, java.lang.Cloneable

    public class ExcludeFieldEnumSelector
    extends FieldSet<java.lang.Enum>
    implements FieldSelector
    A FieldSelector capable of deselecting fields in a record.

    This selector stores undesired fields, represented by values of an enumeration, and will return the indexes of those fields that are not part of the selection.

    See Also:
    FieldSelector, FieldSet
    • Constructor Detail

      • ExcludeFieldEnumSelector

        public ExcludeFieldEnumSelector()
    • Method Detail

      • getFieldIndexes

        public int[] getFieldIndexes​(NormalizedString[] headers)
        Returns the indexes of any that are part of a sequence of headers but not part of the selection.
        Specified by:
        getFieldIndexes in interface FieldSelector
        Parameters:
        headers - the sequence of headers that might have some elements selected by this FieldSelector
        Returns:
        the positions of all elements which were not selected.
      • describe

        public java.lang.String describe()
        Description copied from class: FieldSet
        Returns a string that represents the current field selection
        Specified by:
        describe in interface FieldSelector
        Overrides:
        describe in class FieldSet<java.lang.Enum>
        Returns:
        a string that represents the current field selection
      • clone

        public ExcludeFieldEnumSelector clone()
        Description copied from interface: FieldSelector
        Clones this field selector. Changes to the selection on the clone won't be reflected on the original
        Specified by:
        clone in interface FieldSelector
        Overrides:
        clone in class FieldSet<java.lang.Enum>
        Returns:
        a copy of the current field selector.
      • getFieldIndexes

        public int[] getFieldIndexes​(java.lang.String[] headers)
        Description copied from interface: FieldSelector
        Returns the indexes of any selected fields that are part of a sequence of headers.
        Specified by:
        getFieldIndexes in interface FieldSelector
        Parameters:
        headers - the sequence of headers that might have some elements selected by this FieldSelector
        Returns:
        the positions of all selected elements in the given headers sequence.