Class FieldGroup


  • public class FieldGroup
    extends java.lang.Object
    Represents a field group
    Author:
    Gavin Cornwell
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String id  
      protected java.lang.String label  
      protected boolean mandatory  
      protected FieldGroup parent  
      protected boolean repeats  
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldGroup​(java.lang.String id, java.lang.String label, boolean mandatory, boolean repeats, FieldGroup parent)
      Constructs a FieldGroup
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getId()
      Returns the id of the group
      java.lang.String getLabel()
      Returns the display label of the group
      FieldGroup getParent()
      Returns the parent group
      boolean isMandatory()
      Determines if the group is mandatory
      boolean isRepeating()
      Determines whether the fields inside this group can repeat multiple times
      • Methods inherited from class java.lang.Object

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

      • id

        protected java.lang.String id
      • label

        protected java.lang.String label
      • repeats

        protected boolean repeats
      • mandatory

        protected boolean mandatory
    • Constructor Detail

      • FieldGroup

        public FieldGroup​(java.lang.String id,
                          java.lang.String label,
                          boolean mandatory,
                          boolean repeats,
                          FieldGroup parent)
        Constructs a FieldGroup
        Parameters:
        id - The id of the group
        label - The display label of the group
        mandatory - Whether the group is mandatory
        repeats - Whether the group of fields can repeat
        parent - The group's parent group or null if it doesn't have a parent
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns the id of the group
        Returns:
        The id of the group
      • getLabel

        public java.lang.String getLabel()
        Returns the display label of the group
        Returns:
        The display label of the group
      • getParent

        public FieldGroup getParent()
        Returns the parent group
        Returns:
        The parent group or null if there isn't a parent
      • isRepeating

        public boolean isRepeating()
        Determines whether the fields inside this group can repeat multiple times
        Returns:
        true if the group repeats
      • isMandatory

        public boolean isMandatory()
        Determines if the group is mandatory
        Returns:
        true if the group is mandatory