Enum SimpleUnit
- Alle implementierten Schnittstellen:
Serializable,Comparable<SimpleUnit>,TemporalUnit
A custom temporal unit used for showing numbered units (1, 2, 3, ... or 10,
20, 30, ...).
-
Enum-Konstanten - Übersicht
Enum-KonstantenEnum-KonstanteBeschreibungA 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 TypMethodeBeschreibung<R extends Temporal>
RaddTo(R temporal, long periodToAdd) longlongdecrement(long time) Decrements the given number of milliseconds with the milliseconds represented by the enumerator value.longReturns the number of milliseconds represented by the granularity.longincrement(long time) Increments the given number of milliseconds with the milliseconds represented by the enumerator value.booleanbooleanbooleanisSupportedBy(Temporal temporal) booleanlongtruncate(long time) Truncates the given time point by rounding it down to the nearest multitude of the milliseconds represented by the granularity value.static SimpleUnitGibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück.static SimpleUnit[]values()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, valueOfVon Schnittstelle geerbte Methoden java.time.temporal.TemporalUnit
toString
-
Enum-Konstanten - Details
-
ONE
-
TEN
-
HUNDRED
A granularity representing one hundred milliseconds.- Seit:
- 1.0
-
THOUSAND
A granularity representing one thousand milliseconds.- Seit:
- 1.0
-
THOUSAND_TEN
A granularity representing ten thousand milliseconds.- Seit:
- 1.0
-
THOUSAND_HUNDRED
A granularity representing one hundred thousand milliseconds.- Seit:
- 1.0
-
MILLION
A granularity representing one million milliseconds.- Seit:
- 1.0
-
MILLION_TEN
A granularity representing ten million milliseconds.- Seit:
- 1.0
-
MILLION_HUNDRED
A granularity representing one hundred million milliseconds.- Seit:
- 1.0
-
BILLION
A granularity representing one billion milliseconds.- Seit:
- 1.0
-
BILLION_TEN
A granularity representing ten billion milliseconds.- Seit:
- 1.0
-
BILLION_HUNDRED
A granularity representing one hundred billion milliseconds.- Seit:
- 1.0
-
TRILLION
A granularity representing one trillion milliseconds.- Seit:
- 1.0
-
-
Methodendetails
-
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
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ältNullPointerException- 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 granularityTHOUSANDwould 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
- Angegeben von:
addToin SchnittstelleTemporalUnit
-
between
- Angegeben von:
betweenin SchnittstelleTemporalUnit
-
getDuration
- Angegeben von:
getDurationin SchnittstelleTemporalUnit
-
isDateBased
public boolean isDateBased()- Angegeben von:
isDateBasedin SchnittstelleTemporalUnit
-
isDurationEstimated
public boolean isDurationEstimated()- Angegeben von:
isDurationEstimatedin SchnittstelleTemporalUnit
-
isSupportedBy
- Angegeben von:
isSupportedByin SchnittstelleTemporalUnit
-
isTimeBased
public boolean isTimeBased()- Angegeben von:
isTimeBasedin SchnittstelleTemporalUnit
-