Class TagModel

    • Constructor Detail

      • TagModel

        public TagModel()
        constructor
      • TagModel

        public TagModel​(String name)
        constructor
        Parameters:
        name - the tag name
      • TagModel

        public TagModel​(String name,
                        String value)
        constructor
        Parameters:
        name - the tag name
        value - the tag value
    • Method Detail

      • setName

        public final void setName​(String name)
        sets the name. Converts name to "" if null.
        Parameters:
        name - the tag name
      • getName

        public String getName()
        returns the tag name (key).
        Returns:
        the tag name
      • clearValues

        public void clearValues()
        removes all values from the list of values
      • setValue

        public final void setValue​(String value)
        sets a unique value for this tag. Converts value to "", if null.
        Parameters:
        value - the value.
      • hasValue

        public boolean hasValue​(String value)
        determines if this tag model has a specific value
        Parameters:
        value - the value to be checked; converted to "" if null
        Returns:
        true, if the values of this tag include value; false otherwise
      • addValue

        public void addValue​(String value)
        adds a tag value
        Parameters:
        value - the value to add; converted to "" if null
      • removeValue

        public void removeValue​(String value)
        removes a value from the list of values. Converts value to "" if null
        Parameters:
        value - the value
      • getValues

        public List<StringgetValues()
        returns the list of values
        Returns:
        the list of values
      • getValue

        public String getValue()
        returns the value(s) as string
        Returns:
        the value(s) as string, joined with a semicolon (;) if multiple values
      • getValueCount

        public int getValueCount()
        returns the number of values
        Returns:
        the number of values