Module ical4j.core

Class PercentComplete

All Implemented Interfaces:
Serializable, Comparable<Property>, FluentProperty, Prototype<Property>

public class PercentComplete extends Property
$Id$

Created: [Apr 6, 2004]

Defines a PERCENT-COMPLETE iCalendar component property.

See Also:
  • Constructor Details

    • PercentComplete

      public PercentComplete()
      Default constructor.
    • PercentComplete

      public PercentComplete(ParameterList aList, String aValue)
      Parameters:
      aList - a list of parameters for this component
      aValue - a value string for this component
    • PercentComplete

      public PercentComplete(int aPercentage)
      Parameters:
      aPercentage - an int representation of a percentage
    • PercentComplete

      public PercentComplete(ParameterList aList, int aPercentage)
      Parameters:
      aList - a list of parameters for this component
      aPercentage - an int representation of a percentage
  • Method Details

    • getPercentage

      public final int getPercentage()
      Returns:
      Returns the percentage.
    • setValue

      public final void setValue(String aValue)
      Sets the current value of the property.
      Specified by:
      setValue in class Property
      Parameters:
      aValue - a string representation of the property value
    • getValue

      public final String getValue()
      Specified by:
      getValue in class Content
      Returns:
      the content value
    • setPercentage

      public final void setPercentage(int percentage)
      Parameters:
      percentage - The percentage to set.
    • validate

      public ValidationResult validate() throws ValidationException
      Perform validation on a property.
      Specified by:
      validate in class Property
      Throws:
      ValidationException - where the property is not in a valid state
    • newFactory

      protected PropertyFactory<PercentComplete> newFactory()
      Description copied from class: Property
      Returns a new property factory used to create deep copies.
      Specified by:
      newFactory in class Property
      Returns:
      a property factory instance