Package de.mhus.lib.core.util
Class PropertiesSubset
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.core.lang.MObject
-
- de.mhus.lib.core.AbstractProperties
-
- de.mhus.lib.core.util.PropertiesSubset
-
- All Implemented Interfaces:
ILog,IProperties,IReadProperties,MNlsProvider,Nls,Serializable,Iterable<Map.Entry<String,Object>>,Map<String,Object>
public class PropertiesSubset extends AbstractProperties
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertiesSubset(IProperties parent, String prefix)PropertiesSubset(IProperties parent, String prefix, boolean readonly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsValue(Object value)Set<Map.Entry<String,Object>>entrySet()ObjectgetProperty(String name)Overwrite this function to provide values in string format.booleanisEditable()Overwrite this function and return true if the property set can be edited.booleanisProperty(String name)Return true if the property exists.Set<String>keys()voidremoveProperty(String key)Remove the property field in the list of properties.voidsetProperty(String key, Object value)Overwrite this function to allow changes in properties.intsize()StringtoString()Collection<Object>values()-
Methods inherited from class de.mhus.lib.core.AbstractProperties
containsKey, get, getBoolean, getBoolean, getCalendar, getDate, getDouble, getFloat, getFormatted, getInt, getLong, getNumber, getString, getString, isEmpty, iterator, keySet, put, putAll, putReadProperties, remove, setBoolean, setCalendar, setDate, setDouble, setFloat, setInt, setLong, setNumber, setString, toMap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
PropertiesSubset
public PropertiesSubset(IProperties parent, String prefix)
-
PropertiesSubset
public PropertiesSubset(IProperties parent, String prefix, boolean readonly)
-
-
Method Detail
-
getProperty
public Object getProperty(String name)
Description copied from class:AbstractPropertiesOverwrite this function to provide values in string format.- Specified by:
getPropertyin interfaceIReadProperties- Specified by:
getPropertyin classAbstractProperties- Returns:
- null if the property not exists or the property value.
-
isProperty
public boolean isProperty(String name)
Description copied from class:AbstractPropertiesReturn true if the property exists.- Specified by:
isPropertyin interfaceIReadProperties- Specified by:
isPropertyin classAbstractProperties- Returns:
- if exists
-
removeProperty
public void removeProperty(String key)
Description copied from class:AbstractPropertiesRemove the property field in the list of properties.- Specified by:
removePropertyin interfaceIProperties- Specified by:
removePropertyin classAbstractProperties
-
setProperty
public void setProperty(String key, Object value)
Description copied from class:AbstractPropertiesOverwrite this function to allow changes in properties.- Specified by:
setPropertyin classAbstractProperties
-
isEditable
public boolean isEditable()
Description copied from class:AbstractPropertiesOverwrite this function and return true if the property set can be edited.- Specified by:
isEditablein interfaceIProperties- Specified by:
isEditablein classAbstractProperties- Returns:
- if is editable
-
keys
public Set<String> keys()
- Specified by:
keysin interfaceIReadProperties- Specified by:
keysin classAbstractProperties- Returns:
- the keys
-
size
public int size()
-
containsValue
public boolean containsValue(Object value)
-
values
public Collection<Object> values()
-
clear
public void clear()
-
-