Skip navigation links
oracle.security.jps.service.policystore.info
Class OpssDateTime
java.lang.Object
oracle.security.jps.service.policystore.info.DataType
oracle.security.jps.service.policystore.info.OpssDateTimeObject
oracle.security.jps.service.policystore.info.OpssDateTime
- All Implemented Interfaces:
- ExpressionComponent
-
public class OpssDateTime
- extends OpssDateTimeObject
Represents a data time object as defined by http://www.w3.org/2001/XMLSchema#dateTime A time zone is supported. For more information on how OES supports timezones, see javadoc for OpssDateTimeObject.
Nested classes/interfaces inherited from class oracle.security.jps.service.policystore.info.DataType |
DataType.TYPE |
Constructor Summary |
OpssDateTime(java.util.Date dt, int fracs, int tz)
|
OpssDateTime(java.util.Date date, int fracs, java.lang.String str)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
OpssDateTime
public OpssDateTime(java.util.Date dt,
int fracs,
int tz)
OpssDateTime
public OpssDateTime(java.util.Date date,
int fracs,
java.lang.String str)
getDate
public java.util.Date getDate()
-
- Returns:
- Date of this object.
getFractionalSecs
public int getFractionalSecs()
-
- Returns:
- fractional seconds maintained by this object.
getTimeZonOffset
public int getTimeZonOffset()
getValue
public OpssDateTime getValue()
- Description copied from class:
DataType
- Returns an object representing real value of this data type. For example, OpssInteger.getValue will return an Integer object.
-
- Specified by:
getValue
in class DataType
getType
public final DataType.TYPE getType()
- Description copied from class:
DataType
- For all concrete subclasses, this method is required so that function evaluators at runtime don't need to keep doing instanceof
-
- Specified by:
getType
in class DataType
-
- Returns:
- data type of this object, always TYPE.DATE_TIME
valueOf
public static OpssDateTime valueOf(java.lang.String str)
throws java.lang.IllegalArgumentException
- Creates a DateTime object given a string value. The string is expected to be in this format: d mon yyyy hh:mm:ss.SSSS <time zone name/offset from GMT in milliseconds>
-
- Throws:
java.lang.IllegalArgumentException
compare
public static int compare(OpssDateTime dateTime1,
OpssDateTime dateTime2)
- Compares two OpssDateTime objects. Returns -1 if dateTime1 is smaller than dateTime2, 0 if the two are equal and 1 if dateTime1 is greater than dateTime2
equals
public boolean equals(java.lang.Object other)
- Two DateTimes are equal if their dates and nano-seconds both are equal.
-
- Specified by:
equals
in class DataType
-
- Returns:
- true if this object is equal to other.
hashCode
public int hashCode()
- Overwrite Object's hashCode, since the equals method was overwritten.
-
- Overrides:
hashCode
in class OpssDateTimeObject
-
- Returns:
- hash value of this object.
toString
public java.lang.String toString()
-
- Specified by:
toString
in class DataType
toISODateString
public java.lang.String toISODateString()
- Return the ISO date string .
getComponentType
public ExpressionComponent.Type getComponentType()
- Description copied from interface:
ExpressionComponent
- Returns type of the component.
-
- Returns:
isValid
public boolean isValid()
Skip navigation links
Copyright © 2011, 2013 Oracle. All rights reserved.