Package org.trellisldp.common
Class AcceptDatetime
- java.lang.Object
-
- org.trellisldp.common.AcceptDatetime
-
public class AcceptDatetime extends Object
A class representing an HTTP Accept-Datetime header.
-
-
Constructor Summary
Constructors Constructor Description AcceptDatetime(Instant datetime)
Create an Accept-Datetime header object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getInstant()
Retrieve the corresponding instant.String
toString()
static AcceptDatetime
valueOf(String value)
Create an Accept-Datetime header object from a string.
-
-
-
Constructor Detail
-
AcceptDatetime
public AcceptDatetime(Instant datetime)
Create an Accept-Datetime header object.- Parameters:
datetime
- the date time in RFC 1123 format
-
-
Method Detail
-
getInstant
public Instant getInstant()
Retrieve the corresponding instant.- Returns:
- the instant
-
valueOf
public static AcceptDatetime valueOf(String value)
Create an Accept-Datetime header object from a string.- Parameters:
value
- the header value- Returns:
- an AcceptDatetime object or null if the value is not parseable
-
-