Class Fields

  • All Implemented Interfaces:
    Iterable<Field>, Collection<Field>

    public class Fields
    extends AbstractCollection<Field>
    Most of the methods in this class call .build() to ensure each field is valid.
    • Constructor Summary

      Constructors 
      Constructor Description
      Fields()  
      Fields​(String fields)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(Field field)
      Add one field to the instance of this class.
      boolean addAll​(Collection<? extends Field> collection)
      Adds every element in the specified collection to this instance.
      Fields addField​(Field field)
      Add one field to the instance of this class.
      List<Field> getFieldList()
      Return all fields.
      boolean isEmpty()  
      @NotNull Iterator<Field> iterator()  
      int size()
      Return the count of elements in this instance.
      ArrayNode toArrayNode()  
      • Methods inherited from class AbstractCollection

        clear, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface Collection

        equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
      • Methods inherited from interface Iterable

        forEach
    • Constructor Detail

      • Fields

        public Fields()
      • Fields

        public Fields​(String fields)
               throws JsonProcessingException
        Throws:
        JsonProcessingException
    • Method Detail

      • iterator

        @NotNull
        public @NotNull Iterator<Field> iterator()
        Specified by:
        iterator in interface Collection<Field>
        Specified by:
        iterator in interface Iterable<Field>
        Specified by:
        iterator in class AbstractCollection<Field>
      • size

        public int size()
        Return the count of elements in this instance.
        Specified by:
        size in interface Collection<Field>
        Specified by:
        size in class AbstractCollection<Field>
        Returns:
        the number of elements in this instance.
        Since:
        1.0
      • add

        public boolean add​(Field field)
        Add one field to the instance of this class.
        Specified by:
        add in interface Collection<Field>
        Overrides:
        add in class AbstractCollection<Field>
        Parameters:
        field - a complete Field class.
        Returns:
        an updated instance of this class.
        Since:
        1.0
      • addAll

        public boolean addAll​(Collection<? extends Field> collection)
        Adds every element in the specified collection to this instance.
        Specified by:
        addAll in interface Collection<Field>
        Overrides:
        addAll in class AbstractCollection<Field>
        Parameters:
        collection - collection containing elements to be added to this collection
        Returns:
        true if this collection changed as a result of the call.
        Since:
        1.0
      • addField

        public Fields addField​(Field field)
        Add one field to the instance of this class.
        Parameters:
        field - a complete Field class.
        Returns:
        an updated instance of this class.
        Since:
        1.0
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Collection<Field>
        Overrides:
        isEmpty in class AbstractCollection<Field>
      • toArrayNode

        public ArrayNode toArrayNode()
      • getFieldList

        public List<Field> getFieldList()
        Return all fields.
        Returns:
        all fields in this instance.
        Since:
        1.0