Package net.i2p.data
Class EmptyProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- net.i2p.util.OrderedProperties
-
- net.i2p.data.EmptyProperties
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,Object>
public class EmptyProperties extends OrderedProperties
Immutable OrderedProperties, to reduce object churn in LS2 where it's expected to be empty. Returned from DataHelper.readProperties(in, null). All methods that modify will throw UnsupportedOperationException, except clear() and remove() which do nothing.- Since:
- 0.9.38
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static EmptyProperties
INSTANCE
-
Fields inherited from class java.util.Properties
defaults
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getProperty(String key)
void
load(InputStream inStream)
void
load(Reader reader)
void
loadFromXML(InputStream in)
Object
put(Object key, Object value)
void
putAll(Map<? extends Object,? extends Object> t)
Object
setProperty(String key, String value)
-
Methods inherited from class net.i2p.util.OrderedProperties
entrySet, keySet
-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, equals, forEach, get, getOrDefault, getProperty, hashCode, isEmpty, keys, list, list, merge, propertyNames, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Field Detail
-
INSTANCE
public static final EmptyProperties INSTANCE
-
-
Method Detail
-
getProperty
public String getProperty(String key)
- Overrides:
getProperty
in classProperties
-
load
public void load(InputStream inStream)
- Overrides:
load
in classProperties
-
load
public void load(Reader reader)
- Overrides:
load
in classProperties
-
loadFromXML
public void loadFromXML(InputStream in)
- Overrides:
loadFromXML
in classProperties
-
setProperty
public Object setProperty(String key, String value)
- Overrides:
setProperty
in classProperties
-
-