Class MemoElement

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  MemoElement.Visitor  
      • Nested classes/interfaces inherited from interface com.jscape.util.Visitable

        com.jscape.util.Visitable.VisitorBase, com.jscape.util.Visitable.VisitorException
    • Constructor Summary

      Constructors 
      Constructor Description
      MemoElement()
      Creates a new element instance.
      MemoElement​(java.lang.String name, java.lang.String label, java.lang.String value, boolean required)
      Creates a new element instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object accept​(MemoElement.Visitor visitor)
      Backwards dispatching entry point.
      FormElement copy()  
      boolean equals​(java.lang.Object o)  
      java.lang.String getLabel()
      Return an element label.
      java.lang.String getName()
      Returns an element name.
      java.lang.String getValue()
      Returns an element value.
      int hashCode()  
      boolean isRequired()
      Returns element required flag.
      void setLabel​(java.lang.String value)
      Sets a new element label.
      void setName​(java.lang.String value)
      Sets a new element name.
      void setRequired​(boolean value)
      Sets element required flag.
      void setValue​(java.lang.String value)
      Sets a new element value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MemoElement

        public MemoElement​(java.lang.String name,
                           java.lang.String label,
                           java.lang.String value,
                           boolean required)
        Creates a new element instance.
        Parameters:
        name - an element name
        label - an element label
        value - an element value
        required - if true element is marked as required
      • MemoElement

        public MemoElement()
        Creates a new element instance. Used by serialization sub-system.
    • Method Detail

      • setName

        public void setName​(java.lang.String value)
        Sets a new element name.
        Parameters:
        value - a new element name
      • setLabel

        public void setLabel​(java.lang.String value)
        Sets a new element label.
        Parameters:
        value - a new element label
      • setRequired

        public void setRequired​(boolean value)
        Sets element required flag.
        Parameters:
        value - if true element is marked as required
      • getValue

        public java.lang.String getValue()
        Returns an element value.
        Returns:
        an element value
      • setValue

        public void setValue​(java.lang.String value)
        Sets a new element value.
        Parameters:
        value - a new element value
      • accept

        public java.lang.Object accept​(MemoElement.Visitor visitor)
                                throws com.jscape.util.Visitable.VisitorException
        Description copied from interface: com.jscape.util.Visitable
        Backwards dispatching entry point.
        Specified by:
        accept in interface com.jscape.util.Visitable<MemoElement.Visitor>
        Parameters:
        visitor - a visitor instance
        Returns:
        a visit result if any
        Throws:
        com.jscape.util.Visitable.VisitorException - if an error occurs
      • equals

        public boolean equals​(java.lang.Object o)
        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