Package ch.nolix.system.time.moment
Klasse Time
java.lang.Object
ch.nolix.system.element.base.AbstractElement
ch.nolix.system.time.moment.Time
- Version:
- 2016-09-01
- Autor:
- Silvan Wyss
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Time
forZonedDateTime
(ZonedDateTime zonedDateTime) static Time
fromSpecification
(INode<?> specification) static Time
fromString
(String string) IContainer
<INode<?>> int
int
int
int
int
int
int
int
getYear()
boolean
boolean
boolean
static Time
ofNow()
long
withAddedOrSubtractedDays
(int days) withAddedOrSubtractedHours
(int hours) withAddedOrSubtractedMicroseconds
(long microseconds) withAddedOrSubtractedMilliseconds
(int milliseconds) withAddedOrSubtractedMinutes
(int minutes) withAddedOrSubtractedSeconds
(int seconds) static Time
withYear
(int year) static Time
withYearAndMonthOfYear
(int year, int monthOfYear) static Time
withYearAndMonthOfYearAndDayOfMonth
(int year, int monthOfYear, int dayOfMonth) static Time
withYearAndMonthOfYearAndDayOfMonthAndHourOfDay
(int year, int monthOfYear, int dayOfMonth, int hourOfDay) static Time
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHour
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour) static Time
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMin
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) static Time
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMinAndMillisecOfSec
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisecondOfSecond) static Time
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMinAndMillisecOfSecAndMicrosecOfMillisec
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisecondOfSecond, int microsecondsOfMilliSecond) Von Klasse geerbte Methoden ch.nolix.system.element.base.AbstractElement
equals, getSpecification, hashCode, toString
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.nolix.systemapi.elementapi.baseapi.IElement
getSpecification, toFormatedString, toXml
-
Felddetails
-
DEFAULT_YEAR
public static final int DEFAULT_YEAR- Siehe auch:
-
DEFAULT_MONTH_OF_YEAR
public static final int DEFAULT_MONTH_OF_YEAR- Siehe auch:
-
DEFAULT_DAY_OF_MONTH
public static final int DEFAULT_DAY_OF_MONTH- Siehe auch:
-
DEFAULT_HOUR_OF_DAY
public static final int DEFAULT_HOUR_OF_DAY- Siehe auch:
-
DEFAULT_MINUTE_OF_HOUR
public static final int DEFAULT_MINUTE_OF_HOUR- Siehe auch:
-
DEFAULT_SECOND_OF_MINUTE
public static final int DEFAULT_SECOND_OF_MINUTE- Siehe auch:
-
DEFAULT_MILLISECOND_OF_SECOND
public static final int DEFAULT_MILLISECOND_OF_SECOND- Siehe auch:
-
DEFAULT_MICROSECOND_OF_MILLISECOND
public static final int DEFAULT_MICROSECOND_OF_MILLISECOND- Siehe auch:
-
-
Methodendetails
-
forZonedDateTime
- Parameter:
zonedDateTime
-- Gibt zurück:
- a new
Time
for the given zonedDateTime. - Löst aus:
ArgumentIsNullException
- if the given zonedDateTime is null.
-
fromSpecification
- Parameter:
specification
-- Gibt zurück:
- a new
Time
from the given specification. - Löst aus:
NullPointerException
- if the given specification is null.InvalidArgumentException
- if the given specification does not represent aTime
.
-
fromString
- Parameter:
string
-- Gibt zurück:
- a new
Time
from the given string. - Löst aus:
InvalidArgumentException
- if the given string does not represent aTime
.
-
ofNow
- Gibt zurück:
- a new
Time
that represents the current time.
-
withYear
- Parameter:
year
-- Gibt zurück:
- a new
Time
with the given year.
-
withYearAndMonthOfYear
- Parameter:
year
-monthOfYear
-- Gibt zurück:
- a new
Time
with the given year and monthOfYear.
-
withYearAndMonthOfYearAndDayOfMonth
- Parameter:
year
-monthOfYear
-dayOfMonth
-- Gibt zurück:
- a new
Time
with the given year, monthOfYear and dayOfMonth.
-
withYearAndMonthOfYearAndDayOfMonthAndHourOfDay
public static Time withYearAndMonthOfYearAndDayOfMonthAndHourOfDay(int year, int monthOfYear, int dayOfMonth, int hourOfDay) - Parameter:
year
-monthOfYear
-dayOfMonth
-hourOfDay
-- Gibt zurück:
- a new
Time
with the given year, monthOfYear, dayOfMonth and hourOfDay.
-
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHour
public static Time withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHour(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour) - Parameter:
year
-monthOfYear
-dayOfMonth
-hourOfDay
-minuteOfHour
-- Gibt zurück:
- a new
Time
with the given year, monthOfYear, dayOfMonth, hourOfDay and minuteOfHour.
-
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMin
public static Time withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMin(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) - Parameter:
year
-monthOfYear
-dayOfMonth
-hourOfDay
-minuteOfHour
-secondOfMinute
-- Gibt zurück:
- a new
Time
with the given year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour and secondOfMinute.
-
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMinAndMillisecOfSec
public static Time withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMinAndMillisecOfSec(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisecondOfSecond) - Parameter:
year
-monthOfYear
-dayOfMonth
-hourOfDay
-minuteOfHour
-secondOfMinute
-millisecondOfSecond
-- Gibt zurück:
- a new
Time
with the given year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour, secondOfMinute and millisecondOfSecond.
-
withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMinAndMillisecOfSecAndMicrosecOfMillisec
public static Time withYearAndMonthOfYearAndDayOfMonthAndHourOfDayAndMinOfHourAndSecOfMinAndMillisecOfSecAndMicrosecOfMillisec(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisecondOfSecond, int microsecondsOfMilliSecond) - Parameter:
year
-monthOfYear
-dayOfMonth
-hourOfDay
-minuteOfHour
-secondOfMinute
-millisecondOfSecond
-microsecondsOfMilliSecond
-- Gibt zurück:
- a new
Time
with the given year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour, secondOfMinute and millisecondOfSecond.
-
getAttributes
- Angegeben von:
getAttributes
in SchnittstelleIElement
- Gibt zurück:
- the attributes of the current
IElement
.
-
getDayOfMonth
public int getDayOfMonth()- Angegeben von:
getDayOfMonth
in SchnittstelleITime
- Gibt zurück:
- the day of the month of the current
ITime
.
-
getHourOfDay
public int getHourOfDay()- Angegeben von:
getHourOfDay
in SchnittstelleITime
- Gibt zurück:
- the hour of the day of the current
ITime
.
-
getMicrosecondOfMillisecond
public int getMicrosecondOfMillisecond()- Angegeben von:
getMicrosecondOfMillisecond
in SchnittstelleITime
- Gibt zurück:
- the microsecond of the millisecond of the current
ITime
.
-
getMillisecondOfSecond
public int getMillisecondOfSecond()- Angegeben von:
getMillisecondOfSecond
in SchnittstelleITime
- Gibt zurück:
- the millisecond of the second of the current
ITime
.
-
getMinuteOfHour
public int getMinuteOfHour()- Angegeben von:
getMinuteOfHour
in SchnittstelleITime
- Gibt zurück:
- the minute of the hour of the current
ITime
.
-
getMonthOfYear
- Angegeben von:
getMonthOfYear
in SchnittstelleITime
- Gibt zurück:
- the month of the year of the current
ITime
.
-
getMonthOfYearAsInt
public int getMonthOfYearAsInt()- Angegeben von:
getMonthOfYearAsInt
in SchnittstelleITime
- Gibt zurück:
- the month of the year of the current
ITime
as int.
-
getSecondOfMinute
public int getSecondOfMinute()- Angegeben von:
getSecondOfMinute
in SchnittstelleITime
- Gibt zurück:
- the second of the minute of the current
ITime
.
-
getWeekday
- Angegeben von:
getWeekday
in SchnittstelleITime
- Gibt zurück:
- the weekday of the current
ITime
.
-
getYear
public int getYear() -
isAfter
-
isBefore
-
isInLeapYear
public boolean isInLeapYear()- Angegeben von:
isInLeapYear
in SchnittstelleITime
- Gibt zurück:
- true if the current
ITime
is in a leap year.
-
toSeconds
public long toSeconds() -
withAddedOrSubtractedDays
- Angegeben von:
withAddedOrSubtractedDays
in SchnittstelleITime
- Parameter:
days
-- Gibt zurück:
- a new
ITime
with the given days added to or subtracted from the currentITime
.
-
withAddedOrSubtractedHours
- Angegeben von:
withAddedOrSubtractedHours
in SchnittstelleITime
- Parameter:
hours
-- Gibt zurück:
- a new
ITime
with the given hours added to or subtracted from the currentITime
.
-
withAddedOrSubtractedMicroseconds
- Angegeben von:
withAddedOrSubtractedMicroseconds
in SchnittstelleITime
- Parameter:
microseconds
-- Gibt zurück:
- a new
ITime
with the given microseconds added to or subtracted from the currentITime
.
-
withAddedOrSubtractedMilliseconds
- Angegeben von:
withAddedOrSubtractedMilliseconds
in SchnittstelleITime
- Parameter:
milliseconds
-- Gibt zurück:
- a new
ITime
with the given milliseconds added to or subtracted from to the currentITime
.
-
withAddedOrSubtractedMinutes
- Angegeben von:
withAddedOrSubtractedMinutes
in SchnittstelleITime
- Parameter:
minutes
-- Gibt zurück:
- a new
ITime
with the given minutes added to or subtracted from the currentITime
.
-
withAddedOrSubtractedSeconds
- Angegeben von:
withAddedOrSubtractedSeconds
in SchnittstelleITime
- Parameter:
seconds
-- Gibt zurück:
- a new
ITime
with the given seconds added to or subtracted from the currentITime
.
-