public class MaskedProperty extends Properties implements Serializable
Properties
, to restrict the availability of values to only those which have a key
beginning with a given masking string.
Supported methods to enumerate the list of properties are:
defaults
Constructor and Description |
---|
MaskedProperty(Properties propsToMask,
String mask)
Provides a view to the provided Properties hiding
all keys not starting with some [mask.].
|
MaskedProperty(Properties propsToMask,
String mask,
Properties propsFallBack)
Provides a view to the provided Properties hiding
all keys not starting with some [mask.].
|
load, store, stringPropertyNames
public MaskedProperty(Properties propsToMask, String mask)
propsToMask
- the Properties containing the values.mask
- a String
object.public MaskedProperty(Properties propsToMask, String mask, Properties propsFallBack)
propsToMask
- mask
- propsFallBack
- public String getProperty(String key)
getProperty
in class Properties
public boolean containsKey(Object key)
containsKey
in interface Map<Object,Object>
containsKey
in class Hashtable<Object,Object>
IllegalArgumentException
- if the key is not a String instancepublic String getProperty(String key, String defaultValue)
getProperty
in class Properties
public void list(PrintStream out)
list
in class Properties
UnsupportedOperationException
public void list(PrintWriter out)
list
in class Properties
UnsupportedOperationException
public void load(InputStream inStream) throws IOException
load
in class Properties
UnsupportedOperationException
IOException
public void loadFromXML(InputStream in) throws IOException
loadFromXML
in class Properties
UnsupportedOperationException
IOException
public Enumeration<?> propertyNames()
propertyNames
in class Properties
public void save(OutputStream out, String comments)
save
in class Properties
UnsupportedOperationException
public Object setProperty(String key, String value)
setProperty
in class Properties
UnsupportedOperationException
public void store(OutputStream out, String comments) throws IOException
store
in class Properties
UnsupportedOperationException
IOException
public void storeToXML(OutputStream os, String comment, String encoding) throws IOException
storeToXML
in class Properties
UnsupportedOperationException
IOException
public void storeToXML(OutputStream os, String comment) throws IOException
storeToXML
in class Properties
UnsupportedOperationException
IOException
public void clear()
public Object clone()
clone
in class Hashtable<Object,Object>
UnsupportedOperationException
public boolean contains(Object value)
public boolean containsValue(Object value)
containsValue
in interface Map<Object,Object>
containsValue
in class Hashtable<Object,Object>
UnsupportedOperationException
public Enumeration<Object> elements()
elements
in class Hashtable<Object,Object>
UnsupportedOperationException
public boolean isEmpty()
public Enumeration<Object> keys()
keys
in class Hashtable<Object,Object>
UnsupportedOperationException
protected void rehash()
rehash
in class Hashtable<Object,Object>
UnsupportedOperationException
public int size()
public Collection<Object> values()
public int hashCode()
Copyright © 2006-2014 Red Hat, Inc. All Rights Reserved