Class FieldSet<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      FieldSet()
      Creates am empty field set.
      FieldSet​(java.util.List<FieldSet<T>> wrappedFieldSets)
      Creates a field set that wraps a collection of other field sets.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FieldSet<T> add​(java.util.Collection<T> fields)
      Validates and adds multiple field references
      FieldSet<T> add​(T... fields)
      Validates and adds multiple field references
      private void addElement​(T field)
      Validates and adds a reference to a field.
      FieldSet<T> clone()  
      java.lang.String describe()
      Returns a string that represents the current field selection
      java.util.List<T> get()
      Returns a copy of the fields in this set
      FieldSet<T> remove​(java.util.Collection<T> fields)
      Removes multiple field references in the selection
      FieldSet<T> remove​(T... fields)
      Removes multiple field references in the selection
      FieldSet<T> set​(java.util.Collection<T> fields)
      Validates and sets multiple field references.
      FieldSet<T> set​(T... fields)
      Validates and sets multiple field references.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • fields

        private java.util.List<T> fields
      • wrappedFieldSets

        private java.util.List<FieldSet<T>> wrappedFieldSets
    • Constructor Detail

      • FieldSet

        public FieldSet()
        Creates am empty field set. For internal use only.
      • FieldSet

        public FieldSet​(java.util.List<FieldSet<T>> wrappedFieldSets)
        Creates a field set that wraps a collection of other field sets. For internal use only.
        Parameters:
        wrappedFieldSets - the field sets to be wrapped.
    • Method Detail

      • get

        public java.util.List<T> get()
        Returns a copy of the fields in this set
        Returns:
        a copy of the fields in this set
      • set

        public FieldSet<T> set​(T... fields)
        Validates and sets multiple field references. Any existing reference will be discarded.
        Parameters:
        fields - information that uniquely identifies each field
        Returns:
        the set of currently selected fields
      • add

        public FieldSet<T> add​(T... fields)
        Validates and adds multiple field references
        Parameters:
        fields - information that uniquely identifies each field
        Returns:
        the set of currently selected fields
      • addElement

        private void addElement​(T field)
        Validates and adds a reference to a field.
        Parameters:
        field - information that uniquely identifies a field
      • set

        public FieldSet<T> set​(java.util.Collection<T> fields)
        Validates and sets multiple field references. Any existing reference will be discarded.
        Parameters:
        fields - information that uniquely identifies each field
        Returns:
        the set of currently selected fields
      • add

        public FieldSet<T> add​(java.util.Collection<T> fields)
        Validates and adds multiple field references
        Parameters:
        fields - information that uniquely identifies each field
        Returns:
        the set of currently selected fields
      • remove

        public FieldSet<T> remove​(T... fields)
        Removes multiple field references in the selection
        Parameters:
        fields - information that uniquely identifies each field
        Returns:
        the set of currently selected fields
      • remove

        public FieldSet<T> remove​(java.util.Collection<T> fields)
        Removes multiple field references in the selection
        Parameters:
        fields - information that uniquely identifies each field
        Returns:
        the set of currently selected fields
      • describe

        public java.lang.String describe()
        Returns a string that represents the current field selection
        Returns:
        a string that represents the current field selection
      • toString

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

        public FieldSet<T> clone()
        Overrides:
        clone in class java.lang.Object