Package org.apache.camel.util
Class CamelCaseOrderedProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- org.apache.camel.util.CamelCaseOrderedProperties
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,Object>
public final class CamelCaseOrderedProperties extends Properties
This class is a camelCase orderedProperties
where the key/values are stored in the order they are added or loaded. The keys are stored in the original case, for example a key ofcamel.main.stream-caching-enabled
is stored ascamel.main.stream-caching-enabled
. However the lookup of a value by key with the get methods, will support camelCase or dash style. Note: This implementation is only intended as implementation detail for Camel tooling such as camel-jbang, and has only been designed to provide the needed functionality. The complex logic for loading properties has been kept from the JDKProperties
class.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Constructor Description CamelCaseOrderedProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
asMap()
void
clear()
protected Object
doPut(String key, String value)
Set<Map.Entry<Object,Object>>
entrySet()
Object
get(Object key)
String
getProperty(String key)
String
getProperty(String key, String defaultValue)
boolean
isEmpty()
Enumeration<Object>
keys()
Set<Object>
keySet()
Object
put(Object key, Object value)
void
putAll(Map<?,?> t)
Object
remove(Object key)
int
size()
Set<String>
stringPropertyNames()
String
toString()
Collection<Object>
values()
-
Methods inherited from class java.util.Properties
clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, equals, forEach, getOrDefault, hashCode, list, list, load, load, loadFromXML, merge, propertyNames, putIfAbsent, rehash, remove, replace, replace, replaceAll, save, setProperty, store, store, storeToXML, storeToXML, storeToXML
-
-
-
-
Constructor Detail
-
CamelCaseOrderedProperties
public CamelCaseOrderedProperties()
-
-
Method Detail
-
getProperty
public String getProperty(String key)
-
getProperty
public String getProperty(String key, String defaultValue)
-
putAll
public void putAll(Map<?,?> t)
-
isEmpty
public boolean isEmpty()
-
clear
public void clear()
-
keys
public Enumeration<Object> keys()
- Overrides:
keys
in classProperties
-
size
public int size()
-
stringPropertyNames
public Set<String> stringPropertyNames()
- Overrides:
stringPropertyNames
in classProperties
-
values
public Collection<Object> values()
-
toString
public String toString()
- Overrides:
toString
in classProperties
-
-