Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-03


oracle.security.jps.service.policystore.info
Class OpssYearMonthDuration

java.lang.Object
  extended by oracle.security.jps.service.policystore.info.DataType
      extended by oracle.security.jps.service.policystore.info.OpssYearMonthDuration

All Implemented Interfaces:
ExpressionComponent

public class OpssYearMonthDuration
extends DataType

This class defines a year month duration object as defined by http://www.w3.org/2001/XMLSchema#yearMonthDuration.


Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.security.jps.service.policystore.info.DataType
DataType.TYPE

 

Nested classes/interfaces inherited from interface oracle.security.jps.service.policystore.info.ExpressionComponent
ExpressionComponent.Type

 

Constructor Summary
OpssYearMonthDuration()
          Creates a year month duration with 0 years and 0 months.
OpssYearMonthDuration(long years, long months, boolean negative)
           
OpssYearMonthDuration(java.lang.String str)
          Given a string, generates the YearMonthDuration object.

 

Method Summary
 boolean equals(java.lang.Object other)
          Two OpssYearMonthDuration objects are equal if their years and months both are equal.
 ExpressionComponent.Type getComponentType()
          Returns type of the component.
 long getMonths()
           
 DataType.TYPE getType()
          For all concrete subclasses, this method is required so that function evaluators at runtime don't need to keep doing instanceof
 OpssYearMonthDuration getValue()
          Returns an object representing real value of this data type.
 long getYears()
           
 int hashCode()
          Overwrite Object's hashCode, since the equals method was overwritten.
 boolean isNegative()
           
 boolean isValid()
           
 void setNegative(boolean neg)
          Sets whether the value of this day time duration is negative.
 java.lang.String toString()
           
static OpssYearMonthDuration valueOf(java.lang.String str)
           

 

Methods inherited from class oracle.security.jps.service.policystore.info.DataType
getDataTypeObjectFromString, getDataTypeObjectFromString, getTypeClassFromClassName, getTypeFromClass

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

OpssYearMonthDuration

public OpssYearMonthDuration()
Creates a year month duration with 0 years and 0 months.

OpssYearMonthDuration

public OpssYearMonthDuration(long years,
                             long months,
                             boolean negative)
                      throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

OpssYearMonthDuration

public OpssYearMonthDuration(java.lang.String str)
                      throws java.lang.IllegalArgumentException
Given a string, generates the YearMonthDuration object.
Throws:
java.lang.IllegalArgumentException

Method Detail

getYears

public long getYears()
Returns:
year value of this object.

getMonths

public long getMonths()
Returns:
month value of this object.

isNegative

public boolean isNegative()
Returns:
true if the DayTime duration is -ve, false otherwise.

setNegative

public void setNegative(boolean neg)
Sets whether the value of this day time duration is negative.
Parameters:
neg -

equals

public boolean equals(java.lang.Object other)
Two OpssYearMonthDuration objects are equal if their years and months 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.
Specified by:
hashCode in class DataType
Returns:
hash value of this object.

toString

public java.lang.String toString()
Specified by:
toString in class DataType

getValue

public OpssYearMonthDuration 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.YEARMONTH_DURATION

valueOf

public static OpssYearMonthDuration valueOf(java.lang.String str)
                                     throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getComponentType

public ExpressionComponent.Type getComponentType()
Description copied from interface: ExpressionComponent
Returns type of the component.
Returns:

isValid

public boolean isValid()

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-03


Copyright © 2011, 2013 Oracle. All rights reserved.