public class PublicationDate extends Object implements Serializable
Node
with the Visibility.getStatus()
set to Visibility.Status.PUBLICATION
is visible.Modifier and Type | Method and Description |
---|---|
static PublicationDate |
between(Date start,
Date end)
Creates a new publication date that starts on the specified start date and ends on the specified end date
|
static PublicationDate |
endingOn(Date end)
Creates a new publication date that ends on the specified date
|
boolean |
equals(Object o) |
Date |
getEnd()
Returns the end date or null if no end date is set
|
Date |
getStart()
Returns the start date or null if no start date is set
|
int |
hashCode() |
static PublicationDate |
startingOn(Date start)
Creates a new publication date that starts on the specified date
|
String |
toString() |
boolean |
within(Date date)
Returns true if the publication date is within the specified date
|
boolean |
within(long time)
Returns true if the publication date is within the specified date
|
public static PublicationDate startingOn(Date start)
start
- the start dateIllegalArgumentException
- if start is nullpublic static PublicationDate endingOn(Date end)
end
- the end dateIllegalArgumentException
- if end is nullpublic static PublicationDate between(Date start, Date end)
start
- the start dateend
- the end dateIllegalArgumentException
- if start or end is null, or end date is before start datepublic boolean within(Date date)
date
- the dateIllegalArgumentException
- if date is nullpublic boolean within(long time)
time
- the datepublic Date getStart()
public Date getEnd()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.