Package org.apache.sshd.common
Class Property.DurationProperty
- java.lang.Object
-
- org.apache.sshd.common.Property.BaseProperty<java.time.Duration>
-
- org.apache.sshd.common.Property.DurationProperty
-
- All Implemented Interfaces:
NamedResource
,Property<java.time.Duration>
- Direct Known Subclasses:
Property.DurationInSecondsProperty
public static class Property.DurationProperty extends Property.BaseProperty<java.time.Duration>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.Property
Property.BaseProperty<T>, Property.BooleanProperty, Property.CharsetProperty, Property.DurationInSecondsProperty, Property.DurationProperty, Property.EnumProperty<T extends java.lang.Enum<T>>, Property.IntegerProperty, Property.LongProperty, Property.ObjectProperty, Property.StringProperty, Property.Validating<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.time.Duration
min
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Constructor Summary
Constructors Constructor Description DurationProperty(java.lang.String name)
DurationProperty(java.lang.String name, java.time.Duration def)
DurationProperty(java.lang.String name, java.time.Duration def, java.time.Duration min)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.time.Duration
atLeast(java.lang.String name, java.time.Duration value, java.time.Duration min)
protected java.time.Duration
fromStorage(java.lang.Object value)
private static java.lang.Long
toMillis(java.time.Duration value)
protected java.lang.Object
toStorage(java.time.Duration value)
-
Methods inherited from class org.apache.sshd.common.Property.BaseProperty
get, getDefault, getName, getOrCustomDefault, getType, set, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.Property
getOrNull, getRequired, getRequiredDefault, remove
-
-
-
-
Method Detail
-
toStorage
protected java.lang.Object toStorage(java.time.Duration value)
- Overrides:
toStorage
in classProperty.BaseProperty<java.time.Duration>
-
fromStorage
protected java.time.Duration fromStorage(java.lang.Object value)
- Specified by:
fromStorage
in classProperty.BaseProperty<java.time.Duration>
-
toMillis
private static java.lang.Long toMillis(java.time.Duration value)
-
atLeast
protected static java.time.Duration atLeast(java.lang.String name, java.time.Duration value, java.time.Duration min)
-
-