Class ConfEntry
- java.lang.Object
-
- io.streamthoughts.azkarra.api.config.ConfEntry
-
public class ConfEntry extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
asBoolean()
Gets value as an boolean.double
asDouble()
Gets value as a double.int
asInt()
Gets value as an integer.long
asLong()
Gets valuer as a long.Property
asProperty()
String
asString()
Gets value as a string.List<String>
asStringList()
Gets value as a list.Conf
asSubConf()
Gets value as aConf
.List<Conf>
asSubConfList()
Gets value as a list ofConf
.boolean
equals(Object o)
<T> T
getClass(Class<T> type)
Gets value as an instances of typeConfEntry
.<T> Collection<T>
getClasses(Class<T> type)
Gets value as a list of instances of typeConfEntry
.int
hashCode()
String
key()
Gets the object key.static ConfEntry
of(String key, Object value)
Object
value()
Gets the object value.
-
-
-
Method Detail
-
key
public String key()
Gets the object key.- Returns:
- the string key.
-
value
public Object value()
Gets the object value.- Returns:
- the object value.
-
asString
public String asString()
Gets value as a string.
-
asLong
public long asLong()
Gets valuer as a long.
-
asInt
public int asInt()
Gets value as an integer.- Returns:
- an integer value.
-
asBoolean
public boolean asBoolean()
Gets value as an boolean.- Returns:
- the value as as boolean.
-
asDouble
public double asDouble()
Gets value as a double.- Returns:
- the value as a double.
-
asSubConfList
public List<Conf> asSubConfList()
Gets value as a list ofConf
.- Returns:
- a new list of
Conf
instances.
-
getClasses
public <T> Collection<T> getClasses(Class<T> type)
Gets value as a list of instances of typeConfEntry
.- Type Parameters:
T
- the expected type.- Parameters:
type
- the class of the .- Returns:
- a new
Collection
ofConfEntry
.
-
getClass
public <T> T getClass(Class<T> type)
Gets value as an instances of typeConfEntry
.- Type Parameters:
T
- the expected type.- Parameters:
type
- the class of the .- Returns:
- a new
Collection
ofConfEntry
.
-
-