public final class ImmutableDate extends Date
Date
class.UnsupportedOperationException
when mutable methods are invoked.Constructor and Description |
---|
ImmutableDate()
Allocates a
Date object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond. |
ImmutableDate(long date)
Allocates a
Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January
1, 1970, 00:00:00 GMT. |
Modifier and Type | Method and Description |
---|---|
void |
setDate(int date)
Deprecated.
As of JDK version 1.1.
|
void |
setHours(int hours)
Deprecated.
As of JDK version 1.1.
|
void |
setMinutes(int minutes)
Deprecated.
As of JDK version 1.1.
|
void |
setMonth(int month)
Deprecated.
As of JDK version 1.1.
|
void |
setSeconds(int seconds)
Deprecated.
As of JDK version 1.1.
|
void |
setTime(long time)
Deprecated.
As of JDK version 1.1.
|
void |
setYear(int year)
Deprecated.
As of JDK version 1.1.
|
after, before, clone, compareTo, equals, from, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, toGMTString, toInstant, toLocaleString, toString, UTC
public ImmutableDate()
Date
object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond.public ImmutableDate(long date)
Date
object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January
1, 1970, 00:00:00 GMT.date
- the milliseconds since January 1, 1970, 00:00:00 GMT.@Deprecated public void setDate(int date)
UnsupportedOperationException
.@Deprecated public void setHours(int hours)
UnsupportedOperationException
.@Deprecated public void setMinutes(int minutes)
UnsupportedOperationException
.setMinutes
in class Date
minutes
- the value of the minutes.@Deprecated public void setMonth(int month)
UnsupportedOperationException
.@Deprecated public void setSeconds(int seconds)
UnsupportedOperationException
.setSeconds
in class Date
seconds
- the seconds value.@Deprecated public void setTime(long time)
UnsupportedOperationException
.@Deprecated public void setYear(int year)
UnsupportedOperationException
f.