Package org.restlet.engine.util
Class ImmutableDate
- java.lang.Object
-
- java.util.Date
-
- org.restlet.engine.util.ImmutableDate
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Comparable<java.util.Date>
public final class ImmutableDate extends java.util.DateClass acting as an immutable date class based on theDateclass. ThrowsUnsupportedOperationExceptionwhen mutable methods are invoked.- See Also:
Date, Immutable Date, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ImmutableDate(java.util.Date date)Private constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()voidsetDate(int arg0)As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.voidsetHours(int arg0)As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.voidsetMinutes(int arg0)As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.voidsetMonth(int arg0)As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.voidsetSeconds(int arg0)As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.voidsetTime(long arg0)As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.voidsetYear(int arg0)As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.util.Date
-
setDate
public void setDate(int arg0)
As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.- Overrides:
setDatein classjava.util.Date
-
setHours
public void setHours(int arg0)
As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.- Overrides:
setHoursin classjava.util.Date
-
setMinutes
public void setMinutes(int arg0)
As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.- Overrides:
setMinutesin classjava.util.Date
-
setMonth
public void setMonth(int arg0)
As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.- Overrides:
setMonthin classjava.util.Date
-
setSeconds
public void setSeconds(int arg0)
As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.- Overrides:
setSecondsin classjava.util.Date
-
setTime
public void setTime(long arg0)
As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.- Overrides:
setTimein classjava.util.Date
-
setYear
public void setYear(int arg0)
As an ImmutableDate is immutable, this method throws an UnsupportedOperationException exception.- Overrides:
setYearin classjava.util.Date
-
-