Package de.mhus.lib.core.util
Class MNls
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.core.lang.MObject
-
- de.mhus.lib.core.AbstractProperties
-
- de.mhus.lib.core.util.MNls
-
- All Implemented Interfaces:
ILog,IProperties,IReadProperties,MNlsProvider,Nls,Serializable,Iterable<Map.Entry<String,Object>>,Map<String,Object>
public class MNls extends AbstractProperties
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringprefixprotected Propertiesproperties
-
Constructor Summary
Constructors Constructor Description MNls()MNls(Properties properties, String prefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsValue(Object value)MNlscreateSubstitute(String prefix)Set<Map.Entry<String,Object>>entrySet()static Stringfind(MNlsProvider provider, String in)static Stringfind(MNls nls, String in)static Stringfind(MNls nls, String in, Map<String,Object> attributes)Stringfind(String in)Stringfind(String in, String... strings)Stringfind(String in, Map<String,Object> attributes)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()static MNlslookup(Object owner)static MNlslookup(Object owner, Locale locale)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
-
-
-
-
Field Detail
-
properties
protected Properties properties
-
prefix
protected String prefix
-
-
Constructor Detail
-
MNls
public MNls()
-
MNls
public MNls(Properties properties, String prefix)
-
-
Method Detail
-
find
public static String find(MNlsProvider provider, String in)
-
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()
-
-