Klasse MutableHighLowChartActivityBase<T>

Typparameter:
T - the type of the optional user object
Alle implementierten Schnittstellen:
Activity, HighLowChartActivity, MutableActivity, MutableHighLowChartActivity

public class MutableHighLowChartActivityBase<T> extends HighLowChartActivityBase<T> implements MutableHighLowChartActivity
The base implementation of a mutable high / low activity.
Seit:
1.0
  • Konstruktordetails

    • MutableHighLowChartActivityBase

      public MutableHighLowChartActivityBase()
      Constructs a new high-low activity. The initial high and low values will both be equal to zero. The start time will be equal to Instant.now() and the end time will be equal to Instant.now() plus ActivityBase.DEFAULT_DURATION.
      Seit:
      1.0
    • MutableHighLowChartActivityBase

      public MutableHighLowChartActivityBase(double low, double high, Instant startTime, Instant endTime)
      Constructs a new high-low activity with the given initial high and low values and the given start and end time.
      Parameter:
      low - the low value of the activity
      high - the high value of the activity
      startTime - the start time of the activity
      endTime - the end time of the activity
      Löst aus:
      IllegalArgumentException - if low is larger than high
      Seit:
      1.0
    • MutableHighLowChartActivityBase

      public MutableHighLowChartActivityBase(double low, double high, Instant time)
      Constructs a new high-low activity with the given initial high and low values and the start and end time set to the given time.
      Parameter:
      low - the low value of the activity
      high - the high value of the activity
      time - the start and end time of the activity
      Löst aus:
      IllegalArgumentException - if low is larger than high
      Seit:
      1.0
  • Methodendetails

    • setName

      public void setName(String name)
      Beschreibung aus Schnittstelle kopiert: MutableActivity
      Sets the name of the activity.
      Angegeben von:
      setName in Schnittstelle MutableActivity
      Parameter:
      name - the new name of the activity
    • setUserObject

      public void setUserObject(T userObject)
      Setzt außer Kraft:
      setUserObject in Klasse ActivityBase<T>
    • setStartTime

      public void setStartTime(Instant time)
      Beschreibung aus Schnittstelle kopiert: MutableActivity
      Sets a new start time on the activity.
      Angegeben von:
      setStartTime in Schnittstelle MutableActivity
      Parameter:
      time - the new start time
    • setEndTime

      public void setEndTime(Instant time)
      Beschreibung aus Schnittstelle kopiert: MutableActivity
      Sets a new end time on the activity.
      Angegeben von:
      setEndTime in Schnittstelle MutableActivity
      Parameter:
      time - the new end time
    • setDuration

      public void setDuration(Duration duration)
      Convenience method to determine a new end time based on a duration that will be added to the current start time of the activity.
      Parameter:
      duration - the duration of the activity
      Seit:
      1.0
    • getDuration

      public Duration getDuration()
      Convenience method to determine the duration between the start and the end time of the activity.
      Gibt zurück:
      the duration of the activity
    • addDuration

      public void addDuration(Duration duration)
      Convenience method to determine a new end time based on a duration that will be added once to the current end time of the activity.
      Parameter:
      duration - the duration of the activity
      Seit:
      1.0
    • addDuration

      public void addDuration(Duration duration, long multipliedBy)
      Convenience method to determine a new end time based on a duration that will be added several times to the current end time of the activity.
      Parameter:
      duration - the duration of the activity
      multipliedBy - the number of times that the duration will be added
      Seit:
      1.0
    • setHigh

      public void setHigh(double high)
      Beschreibung aus Schnittstelle kopiert: MutableHighLowChartActivity
      Sets the high value of the activity.
      Angegeben von:
      setHigh in Schnittstelle MutableHighLowChartActivity
      Parameter:
      high - the new high value
    • setLow

      public void setLow(double low)
      Beschreibung aus Schnittstelle kopiert: MutableHighLowChartActivity
      Sets the low value of the activity.
      Angegeben von:
      setLow in Schnittstelle MutableHighLowChartActivity
      Parameter:
      low - the new low value
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse HighLowChartActivityBase<T>