Package org.cip4.jdflib.util
Interface Duration
-
@Deprecated public interface DurationDeprecated.use the JDFDuration class only
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREGEX_DURATIONDeprecated.static longserialVersionUIDDeprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description intgetDuration()Deprecated.the duration in secondsjava.lang.StringgetDurationISO()Deprecated.Format and return the duration set by 'setDuration(int i)' or 'setDurationString(String a_aDuration)' as an ISO conform String.booleanisLonger(Duration x)Deprecated.isLess - tests if the duration of this JDFDuration is longer then the duration of the specified JDFDuration.booleanisShorter(Duration x)Deprecated.isShorter - tests if the duration of this JDFDuration is less then the duration of the specified JDFDuration.voidsetDuration(int i)Deprecated.setDuration sets a duration for this in seconds.booleansetDurationISO(java.lang.String a_aDuration)Deprecated.Set a duration.
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
Deprecated.- See Also:
- Constant Field Values
-
REGEX_DURATION
static final java.lang.String REGEX_DURATION
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDurationISO
java.lang.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(java.lang.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'.
-
-