org.cip4.jdflib.util
Interface Duration


Deprecated. use the JDFDuration class only

@Deprecated
public interface Duration

Author:
prosirai

Field Summary
static String REGEX_DURATION
          Deprecated.  
static long serialVersionUID
          Deprecated.  
 
Method Summary
 int getDuration()
          Deprecated. the duration in seconds
 String getDurationISO()
          Deprecated. Format and return the duration set by 'setDuration(int i)' or 'setDurationString(String a_aDuration)' as an ISO conform String.
 boolean isLonger(Duration x)
          Deprecated. isLess - tests if the duration of this JDFDuration is longer then the duration of the specified JDFDuration.
 boolean isShorter(Duration x)
          Deprecated. isShorter - tests if the duration of this JDFDuration is less then the duration of the specified JDFDuration.
 void setDuration(int i)
          Deprecated. setDuration sets a duration for this in seconds.
 boolean setDurationISO(String a_aDuration)
          Deprecated. Set a duration.
 

Field Detail

serialVersionUID

static final long serialVersionUID
Deprecated. 
See Also:
Constant Field Values

REGEX_DURATION

static final String REGEX_DURATION
Deprecated. 
See Also:
Constant Field Values
Method Detail

getDurationISO

String getDurationISO()
Deprecated. 
Format and return the duration set by 'setDuration(int i)' or 'setDurationString(String a_aDuration)' as an ISO conform String. For Exmaple: 'P1Y2M3DT10H30M'

Returns:
String the duration formated as an ISO 8601 conform String if duration is '0' return value is 'PT00M'

setDurationISO

boolean setDurationISO(String a_aDuration)
Deprecated. 
Set a duration. Durations are not bound to time or date and can be set independently

Parameters:
a_aDuration - formatted duration string 'P1Y2M3DT10H30M'
Returns:
true the duration was set false the duration was not set, because a NumberFormatException was thrown (-> parseInt())

setDuration

void setDuration(int i)
Deprecated. 
setDuration sets a duration for this in seconds. This duration is used in multiple classes of the jdf. Heating time for example.

Parameters:
i - the duration in seconds. Values below '0' are set to '0'

getDuration

int getDuration()
Deprecated. 
the duration in seconds

Returns:
int the duration in seconds; '0' default

isLonger

boolean isLonger(Duration x)
Deprecated. 
isLess - tests if the duration of this JDFDuration is longer then the duration of the specified JDFDuration.

Parameters:
x - - the JDFDuration object you whant to compare with 'this' JDFDuration object
Returns:
boolean - true if the duration of this JDFDuration is longer then the duration of the JDFDuration 'x'.

isShorter

boolean isShorter(Duration x)
Deprecated. 
isShorter - tests if the duration of this JDFDuration is less then the duration of the specified JDFDuration.

Parameters:
x - - the JDFDuration object that duration you whant to compare with duration of 'this' JDFDuration object
Returns:
boolean - true if the duration of this JDFDuration is shorter then the duration of the JDFDuration 'x'.


Copyright © 2013. All Rights Reserved.