com.plumtree.remote.prc
Class TimeInterval

java.lang.Object
  extended bycom.plumtree.remote.prc.TimeInterval

public class TimeInterval
extends java.lang.Object

A type used to represents the numeric value and the unit component of a time interval. See IDocumentManager.setBrokenLinkDeletionTime(int, com.plumtree.remote.prc.TimeInterval) and IDocumentManager.setRefreshRate(int, com.plumtree.remote.prc.TimeInterval, boolean).


Field Summary
static TimeInterval INFINITE
          A static field to represent an infinite time interval.
 
Constructor Summary
TimeInterval(int value, TimeIntervalUnit unit)
          Creates a TimeInterval with the specified value and unit.
 
Method Summary
 TimeIntervalUnit getUnit()
          Returns the unit of the time interval.
 int getValue()
          Returns the value of the time interval.
 void setUnit(TimeIntervalUnit unit)
          Sets the unit of the time interval.
 void setValue(int value)
          Sets the value of the interval.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFINITE

public static final TimeInterval INFINITE
A static field to represent an infinite time interval. Default value is Integer.MAX_VALUE and default unit is TimeIntervalUnit.UNSET.
Neither the value nor the unit component of this field can be modified, otherwise an IllegalStateException will be thrown.

Constructor Detail

TimeInterval

public TimeInterval(int value,
                    TimeIntervalUnit unit)
Creates a TimeInterval with the specified value and unit.

Parameters:
value - the numeric component of a time interval
unit - the unit component of the time interval; cannot be TimeIntervalUnit.UNSET
Throws:
java.lang.IllegalArgumentException - if TimeIntervalUnit.UNSET is set to be the unit
Method Detail

getUnit

public TimeIntervalUnit getUnit()
Returns the unit of the time interval. For TimeInterval.INFINITE, TimeIntervalUnit.UNSET will be returned.

Returns:
the unit of the time interval

setUnit

public void setUnit(TimeIntervalUnit unit)
Sets the unit of the time interval.

Parameters:
unit - the unit of the time interval
Throws:
java.lang.IllegalStateException - if the current instance is a TimeInterval.INFINITE

getValue

public int getValue()
Returns the value of the time interval. For TimeInterval.INFINITE, Integer.MAX_VALUE will be returned.

Returns:
the value of the time interval

setValue

public void setValue(int value)
Sets the value of the interval.

Parameters:
value - the numeric value of the time interval
Throws:
java.lang.IllegalStateException - if the current instance is a TimeInterval.INFINITE


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.