java.lang.Object
java.util.Date
java.sql.Timestamp
com.aoapps.sql.UnmodifiableTimestamp
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Date>
An unmodifiable Timestamp that may be used in return values and shared between threads.
- Author:
- AO Industries, Inc.
- See Also:
-
Constructor Summary
ConstructorDescriptionUnmodifiableTimestamp
(int year, int month, int date, int hour, int minute, int second, int nano) Deprecated.UnmodifiableTimestamp
(long time) UnmodifiableTimestamp
(long time, int nanos) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Return a copy of this object.void
setDate
(int month) Deprecated.As of JDK version 1.1,void
setHours
(int month) Deprecated.As of JDK version 1.1,void
setMinutes
(int month) Deprecated.As of JDK version 1.1,void
setMonth
(int month) Deprecated.As of JDK version 1.1,void
setNanos
(int n) void
setSeconds
(int month) Deprecated.As of JDK version 1.1,void
setTime
(long time) void
setYear
(int year) Deprecated.As of JDK version 1.1,static UnmodifiableTimestamp
Creates a new UnmodifiableTimestamp from a Timestamp.Methods inherited from class java.sql.Timestamp
after, before, compareTo, compareTo, equals, equals, from, getNanos, getTime, hashCode, toInstant, toLocalDateTime, toString, valueOf, valueOf
Methods inherited from class java.util.Date
after, before, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, toGMTString, toLocaleString, UTC
-
Constructor Details
-
UnmodifiableTimestamp
public UnmodifiableTimestamp(long time, int nanos) -
UnmodifiableTimestamp
public UnmodifiableTimestamp(long time) -
UnmodifiableTimestamp
@Deprecated public UnmodifiableTimestamp(int year, int month, int date, int hour, int minute, int second, int nano) Deprecated.instead use the constructorTimestamp(long millis)
-
-
Method Details
-
valueOf
Creates a new UnmodifiableTimestamp from a Timestamp.- If the wrapped timestamp is null, returns null.
- If the wrapped timestamp is already unmodifiable, returns it.
- Otherwise returns a new timestamp with the same value.
-
clone
Return a copy of this object. -
setYear
Deprecated.As of JDK version 1.1, -
setMonth
Deprecated.As of JDK version 1.1, -
setDate
Deprecated.As of JDK version 1.1, -
setHours
Deprecated.As of JDK version 1.1, -
setMinutes
Deprecated.As of JDK version 1.1,- Overrides:
setMinutes
in classDate
-
setSeconds
Deprecated.As of JDK version 1.1,- Overrides:
setSeconds
in classDate
-
setTime
public void setTime(long time) -
setNanos
public void setNanos(int n)
-
Timestamp(long millis)