Enum SimpleUnit

java.lang.Object
java.lang.Enum<SimpleUnit>
com.flexganttfx.model.util.SimpleUnit
Alle implementierten Schnittstellen:
Serializable, Comparable<SimpleUnit>, TemporalUnit

public enum SimpleUnit extends Enum<SimpleUnit> implements TemporalUnit
A custom temporal unit used for showing numbered units (1, 2, 3, ... or 10, 20, 30, ...).
  • Enum-Konstanten - Übersicht

    Enum-Konstanten
    Enum-Konstante
    Beschreibung
    A granularity representing one billion milliseconds.
    A granularity representing one hundred billion milliseconds.
    A granularity representing ten billion milliseconds.
    A granularity representing one hundred milliseconds.
    A granularity representing one million milliseconds.
    A granularity representing one hundred million milliseconds.
    A granularity representing ten million milliseconds.
    A granularity representing one millisecond.
    A granularity representing ten milliseconds.
    A granularity representing one thousand milliseconds.
    A granularity representing one hundred thousand milliseconds.
    A granularity representing ten thousand milliseconds.
    A granularity representing one trillion milliseconds.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    <R extends Temporal>
    R
    addTo(R temporal, long periodToAdd)
     
    long
     
    long
    decrement(long time)
    Decrements the given number of milliseconds with the milliseconds represented by the enumerator value.
     
    long
    Returns the number of milliseconds represented by the granularity.
    long
    increment(long time)
    Increments the given number of milliseconds with the milliseconds represented by the enumerator value.
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    long
    truncate(long time)
    Truncates the given time point by rounding it down to the nearest multitude of the milliseconds represented by the granularity value.
    static SimpleUnit
    Gibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück.
    static SimpleUnit[]
    Gibt ein Array mit den Konstanten dieses Enum-Typs in der Reihenfolge ihrer Deklaration zurück.

    Von Klasse geerbte Methoden java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Von Klasse geerbte Methoden java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Von Schnittstelle geerbte Methoden java.time.temporal.TemporalUnit

    toString
  • Enum-Konstanten - Details

    • ONE

      public static final SimpleUnit ONE
      A granularity representing one millisecond.
      Seit:
      1.0
    • TEN

      public static final SimpleUnit TEN
      A granularity representing ten milliseconds.
      Seit:
      1.0
    • HUNDRED

      public static final SimpleUnit HUNDRED
      A granularity representing one hundred milliseconds.
      Seit:
      1.0
    • THOUSAND

      public static final SimpleUnit THOUSAND
      A granularity representing one thousand milliseconds.
      Seit:
      1.0
    • THOUSAND_TEN

      public static final SimpleUnit THOUSAND_TEN
      A granularity representing ten thousand milliseconds.
      Seit:
      1.0
    • THOUSAND_HUNDRED

      public static final SimpleUnit THOUSAND_HUNDRED
      A granularity representing one hundred thousand milliseconds.
      Seit:
      1.0
    • MILLION

      public static final SimpleUnit MILLION
      A granularity representing one million milliseconds.
      Seit:
      1.0
    • MILLION_TEN

      public static final SimpleUnit MILLION_TEN
      A granularity representing ten million milliseconds.
      Seit:
      1.0
    • MILLION_HUNDRED

      public static final SimpleUnit MILLION_HUNDRED
      A granularity representing one hundred million milliseconds.
      Seit:
      1.0
    • BILLION

      public static final SimpleUnit BILLION
      A granularity representing one billion milliseconds.
      Seit:
      1.0
    • BILLION_TEN

      public static final SimpleUnit BILLION_TEN
      A granularity representing ten billion milliseconds.
      Seit:
      1.0
    • BILLION_HUNDRED

      public static final SimpleUnit BILLION_HUNDRED
      A granularity representing one hundred billion milliseconds.
      Seit:
      1.0
    • TRILLION

      public static final SimpleUnit TRILLION
      A granularity representing one trillion milliseconds.
      Seit:
      1.0
  • Methodendetails

    • values

      public static SimpleUnit[] values()
      Gibt ein Array mit den Konstanten dieses Enum-Typs in der Reihenfolge ihrer Deklaration zurück.
      Gibt zurück:
      ein Array mit den Konstanten dieses Enumerationstyps in der Reihenfolge ihrer Deklaration
    • valueOf

      public static SimpleUnit valueOf(String name)
      Gibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enumerationskonstante in diesem Typ deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)
      Parameter:
      name - Name der zurückzugebenden Enumerationskonstante.
      Gibt zurück:
      Enumerationskonstante mit dem angegebenen Namen
      Löst aus:
      IllegalArgumentException - wenn dieser Enumerationstyp keine Konstante mit dem angegebenen Namen enthält
      NullPointerException - wenn das Argument nicht angegeben wird
    • increment

      public long increment(long time)
      Increments the given number of milliseconds with the milliseconds represented by the enumerator value.
      Parameter:
      time - the time to increment
      Gibt zurück:
      the given time plus the milliseconds represented by the value
      Seit:
      1.0
    • decrement

      public long decrement(long time)
      Decrements the given number of milliseconds with the milliseconds represented by the enumerator value.
      Parameter:
      time - the time to increment
      Gibt zurück:
      the given time minus the milliseconds represented by the value
      Seit:
      1.0
    • truncate

      public long truncate(long time)
      Truncates the given time point by rounding it down to the nearest multitude of the milliseconds represented by the granularity value. Example: the granularity THOUSAND would adjust the time point 4366 to 4000.
      Parameter:
      time - the time that needs adjustment
      Gibt zurück:
      a number of milliseconds that is a multitude of the number of milliseconds represented by the enumerator value and that is still smaller than the given time
      Seit:
      1.0
    • getMillis

      public long getMillis()
      Returns the number of milliseconds represented by the granularity.
      Gibt zurück:
      number of milliseconds represented by the granularity
      Seit:
      1.0
    • addTo

      public <R extends Temporal> R addTo(R temporal, long periodToAdd)
      Angegeben von:
      addTo in Schnittstelle TemporalUnit
    • between

      public long between(Temporal t1, Temporal t2)
      Angegeben von:
      between in Schnittstelle TemporalUnit
    • getDuration

      public Duration getDuration()
      Angegeben von:
      getDuration in Schnittstelle TemporalUnit
    • isDateBased

      public boolean isDateBased()
      Angegeben von:
      isDateBased in Schnittstelle TemporalUnit
    • isDurationEstimated

      public boolean isDurationEstimated()
      Angegeben von:
      isDurationEstimated in Schnittstelle TemporalUnit
    • isSupportedBy

      public boolean isSupportedBy(Temporal temporal)
      Angegeben von:
      isSupportedBy in Schnittstelle TemporalUnit
    • isTimeBased

      public boolean isTimeBased()
      Angegeben von:
      isTimeBased in Schnittstelle TemporalUnit