Package io.hekate.core
Class ServiceProperty<T>
- java.lang.Object
-
- io.hekate.core.ServiceProperty<T>
-
- Type Parameters:
T
- Property type.
- All Implemented Interfaces:
Serializable
public final class ServiceProperty<T> extends Object implements Serializable
Property ofServiceInfo
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServiceProperty.Type
Service property type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServiceProperty<Boolean>
forBoolean(String name, boolean value)
Constructs a new property ofServiceProperty.Type.BOOLEAN
type.static ServiceProperty<Integer>
forInteger(String name, int value)
Constructs a new property ofServiceProperty.Type.INTEGER
type.static ServiceProperty<Long>
forLong(String name, long value)
Constructs a new property ofServiceProperty.Type.LONG
type.static ServiceProperty<String>
forString(String name, String value)
Constructs a new property ofServiceProperty.Type.STRING
type.String
name()
Returns the property name.String
toString()
ServiceProperty.Type
type()
Returns the property type.T
value()
Returns the property value.
-
-
-
Method Detail
-
forString
public static ServiceProperty<String> forString(String name, String value)
Constructs a new property ofServiceProperty.Type.STRING
type.- Parameters:
name
- Property name.value
- Property value.- Returns:
- New property.
-
forInteger
public static ServiceProperty<Integer> forInteger(String name, int value)
Constructs a new property ofServiceProperty.Type.INTEGER
type.- Parameters:
name
- Property name.value
- Property value.- Returns:
- New property.
-
forLong
public static ServiceProperty<Long> forLong(String name, long value)
Constructs a new property ofServiceProperty.Type.LONG
type.- Parameters:
name
- Property name.value
- Property value.- Returns:
- New property.
-
forBoolean
public static ServiceProperty<Boolean> forBoolean(String name, boolean value)
Constructs a new property ofServiceProperty.Type.BOOLEAN
type.- Parameters:
name
- Property name.value
- Property value.- Returns:
- New property.
-
type
public ServiceProperty.Type type()
Returns the property type.- Returns:
- Property type.
-
name
public String name()
Returns the property name.- Returns:
- Property name.
-
value
public T value()
Returns the property value.- Returns:
- Property value.
-
-