Class VParameterBase<U,T>

java.lang.Object
jfxtras.icalendarfx.VElementBase
jfxtras.icalendarfx.parameters.VParameterBase<U,T>
Type Parameters:
T - - type of value stored in the Parameter, such as String for text-based, or the enumerated type of the classes based on an enum
U - - implemented subclass
All Implemented Interfaces:
VParameter<T>, VChild, VElement
Direct Known Subclasses:
AlarmTriggerRelationship, AlternateText, CommonName, Delegatees, Delegators, DirectoryEntry, Encoding, FormatType, GroupMembership, Language, NonStandardParameter, ParameterEnumBasedWithUnknown, Range, RSVP, SentBy, TimeZoneIdentifierParameter

public abstract class VParameterBase<U,T> extends VElementBase implements VParameter<T>
Base class of all iCalendar Parameters. Parameters can't have children. Example VALUE=DATE
  • Field Details

    • myParent

      private VParent myParent
    • value

      private T value
    • converter

      protected final StringConverter<T> converter
      STRING CONVERTER Get the parameter value string converter.
    • elementType

      protected final VParameterElement elementType
      PARAMETER TYPE The enumerated type of the parameter.
  • Constructor Details

  • Method Details

    • setParent

      public void setParent(VParent parent)
      Description copied from interface: VChild
      Set the VParent of this VChild. This method is invoked internally by the API. Under normal circumstances it should not be used externally
      Specified by:
      setParent in interface VChild
    • getParent

      public VParent getParent()
      Description copied from interface: VChild
      Gets the VParent of this VChild
      Specified by:
      getParent in interface VChild
    • getValue

      public T getValue()
      Description copied from interface: VParameter
      The value of the parameter. For example, in the below parameter: CN=John Doe The value is the String "John Doe" Note: the value's object must have an overridden toString method that complies with iCalendar content line output.
      Specified by:
      getValue in interface VParameter<U>
    • setValue

      public void setValue(T value)
      Description copied from interface: VParameter
      Set the value of this parameter
      Specified by:
      setValue in interface VParameter<U>
    • setValue

      public void setValue(CharSequence value)
    • withValue

      public U withValue(T value)
    • withValue

      public U withValue(CharSequence value)
    • valueAsString

      String valueAsString()
    • parseContent

      protected List<VElementBase.Message> parseContent(String content)
      Description copied from class: VElementBase
      Parse content line into calendar element. If element contains children VElementBase.parseContent(String) is invoked recursively to parse child elements also
      Specified by:
      parseContent in class VElementBase
      Parameters:
      content - calendar content string to parse
      Returns:
      log of information and error messages
    • getConverter

      private StringConverter<T> getConverter()
    • name

      public String name()
      Description copied from interface: VElement

      Returns the name of the component as it would appear in the iCalendar content line.

      Examples:

      • VEVENT
      • SUMMARY
      • LANGUAGE

      Specified by:
      name in interface VElement
      Returns:
      - the component name
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • errors

      public List<String> errors()
      Description copied from interface: VElement
      Produces a list of error messages indicating problems with calendar element VElement.errors() is invoked recursively to return errors of child elements in addition to errors in parent
      Specified by:
      errors in interface VElement
      Returns:
      - list of error messages
    • extractValue

      static String extractValue(String content)