|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.basic.PartialTime
public final class PartialTime
A PartialTime
may represent a specific instant in time or a not yet fully specified
instance in time. That means every part (year, days, time zone ...) is optional.
Comparison of two PartialTime
's are only supported if at least one instance is fully
specified.
Comparison simply ignores positions with an asterix.
A comparison is always relative to a given TimeStamp
. This is due the fact that an
PartialTime
may be specified in local time.
Time: (*|YYYY)-(*|MM)-(*|DD)T(*|hh):(*|mm):(*|ss)
.
Zone: Z|([+-]hh:ss)
.
Examples:
Constructor Summary | |
---|---|
PartialTime(boolean isYearAsterix,
int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
boolean hasZone,
int offsetHours,
int offsetMinutes,
org.joda.time.DateTimeZone defaultZone,
boolean allowWildcards)
Creates a new PartialTime with a default time zone. |
|
PartialTime(Date date)
Creates an PartialTime from a Date . |
|
PartialTime(String string,
org.joda.time.DateTimeZone defaultZone,
boolean allowWildcards)
Creates a new PartialTime from a string with a default time zone. |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
int |
hashCode()
|
boolean |
inSameTimeZone(PartialTime other)
Returns true if this time is in the same time zone as other. |
boolean |
isAfter(PartialTime other,
TimeStamp timeStamp)
Return true if this time is after other time. |
boolean |
isBefore(PartialTime other,
TimeStamp timeStamp)
Return true if this time is before other time. |
boolean |
isComparableWith(PartialTime other)
Returns true if this and other are comparable. |
boolean |
isComplete()
Returns true if this time is complete defined and contains no asterix's. |
boolean |
isEqual(PartialTime other,
TimeStamp timeStamp)
Return true if this time is equal other time. |
org.joda.time.DateTime |
toDateTime(TimeStamp timeStamp)
Returns this as DateTime . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PartialTime(Date date)
PartialTime
from a Date
.
date
- a Date
.public PartialTime(String string, org.joda.time.DateTimeZone defaultZone, boolean allowWildcards) throws NumberFormatException
PartialTime
from a string with a default time zone. The default zone
may be null and therefore the local time zone at evaluation time is taken.
string
- see PartialTime
class description.defaultZone
- a default DateTimeZone
.
NumberFormatException
public PartialTime(boolean isYearAsterix, int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, boolean hasZone, int offsetHours, int offsetMinutes, org.joda.time.DateTimeZone defaultZone, boolean allowWildcards)
PartialTime
with a default time zone. The default zone
may be null and therefore the local time zone at evaluation time is used.
year
- the year.monthOfYear
- the month of year.dayOfMonth
- the day of month.hourOfDay
- the hour of date.minuteOfHour
- the minute of hour.secondOfMinute
- the second of minute.defaultZone
- a default DateTimeZone
.Method Detail |
---|
public boolean isComplete()
public boolean inSameTimeZone(PartialTime other)
public org.joda.time.DateTime toDateTime(TimeStamp timeStamp)
DateTime
.
timeStamp
- a TimeStamp
.
DateTime
.public boolean isComparableWith(PartialTime other)
other
- an PartialTime
.
public boolean isAfter(PartialTime other, TimeStamp timeStamp)
other
- an PartialTime
.timeStamp
- evaluation time.public boolean isBefore(PartialTime other, TimeStamp timeStamp)
other
- an PartialTime
.timeStamp
- evaluation time.public boolean isEqual(PartialTime other, TimeStamp timeStamp)
other
- an PartialTime
.timeStamp
- evaluation time.public boolean equals(Object object)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:10
Copyright (c) 2002-2007 Ergon Informatik AG