public final class FrozenConfiguration extends Object implements org.apache.tamaya.Configuration, Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
get(String key) |
<T> T |
get(String key,
Class<T> type) |
<T> T |
get(String key,
org.apache.tamaya.TypeLiteral<T> type)
Accesses the current String value for the given key and tries to convert it
using the
PropertyConverter instances provided by the current
ConfigurationContext . |
org.apache.tamaya.spi.ConfigurationContext |
getContext() |
<T> T |
getOrDefault(String key,
Class<T> type,
T defaultValue) |
String |
getOrDefault(String key,
String defaultValue) |
<T> T |
getOrDefault(String key,
org.apache.tamaya.TypeLiteral<T> type,
T defaultValue) |
Map<String,String> |
getProperties() |
int |
hashCode() |
static FrozenConfiguration |
of(org.apache.tamaya.Configuration config)
Creates a new FrozenConfiguration instance based on a Configuration given.
|
<T> T |
query(org.apache.tamaya.ConfigQuery<T> query) |
String |
toString() |
org.apache.tamaya.Configuration |
with(org.apache.tamaya.ConfigOperator operator) |
public static FrozenConfiguration of(org.apache.tamaya.Configuration config)
config
- the configuration to be frozen, not null.public String getOrDefault(String key, String defaultValue)
getOrDefault
in interface org.apache.tamaya.Configuration
public <T> T getOrDefault(String key, Class<T> type, T defaultValue)
getOrDefault
in interface org.apache.tamaya.Configuration
public <T> T get(String key, Class<T> type)
get
in interface org.apache.tamaya.Configuration
public <T> T get(String key, org.apache.tamaya.TypeLiteral<T> type)
PropertyConverter
instances provided by the current
ConfigurationContext
.get
in interface org.apache.tamaya.Configuration
T
- the value typekey
- the property's absolute, or relative path, e.g. @code
a/b/c/d.myProperty}.type
- The target type required, not null.public <T> T getOrDefault(String key, org.apache.tamaya.TypeLiteral<T> type, T defaultValue)
getOrDefault
in interface org.apache.tamaya.Configuration
public Map<String,String> getProperties()
getProperties
in interface org.apache.tamaya.Configuration
public org.apache.tamaya.Configuration with(org.apache.tamaya.ConfigOperator operator)
with
in interface org.apache.tamaya.Configuration
public <T> T query(org.apache.tamaya.ConfigQuery<T> query)
query
in interface org.apache.tamaya.Configuration
public org.apache.tamaya.spi.ConfigurationContext getContext()
getContext
in interface org.apache.tamaya.Configuration
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.