Class IndexSortedProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- de.alpharogroup.collections.properties.SortedProperties
-
- de.alpharogroup.collections.properties.IndexSortedProperties
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.Object,java.lang.Object>
public class IndexSortedProperties extends SortedProperties
The classIndexSortedPropertiesextends SortedProperties and holds an intern list with the keys for get values over an index.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IndexSortedProperties()Instantiates a newIndexSortedProperties.IndexSortedProperties(java.util.Properties defaults)Instantiates a newIndexSortedProperties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()java.lang.Objectget(int index)Gets the entry from the given index.java.lang.StringgetProperty(int index)Gets the property over the index.intindexOf(java.lang.Object object)Gets the index of the given object.static IndexSortedPropertiesof()Factory method to create a newIndexSortedPropertiesobject.static IndexSortedPropertiesof(java.util.Properties defaults)Factory method to create a newIndexSortedPropertiesobject.static IndexSortedPropertiesof(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator)Factory method to create a newIndexSortedPropertiesobject.static IndexSortedPropertiesof(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator, boolean nullIsGreaterThan)Factory method to create a newIndexSortedPropertiesobject.java.lang.Objectput(java.lang.Object key, java.lang.Object value)voidputAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> t)java.lang.Objectremove(int index)Removes the entry from the given index.java.lang.Objectremove(java.lang.Object key)booleanremove(java.lang.Object key, java.lang.Object value)-
Methods inherited from class de.alpharogroup.collections.properties.SortedProperties
getComparator, keys, keySet, newComparator, propertyNames
-
Methods inherited from class java.util.Properties
clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, list, list, load, load, loadFromXML, merge, putIfAbsent, rehash, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Constructor Detail
-
IndexSortedProperties
public IndexSortedProperties()
Instantiates a newIndexSortedProperties.
-
IndexSortedProperties
public IndexSortedProperties(java.util.Properties defaults)
Instantiates a newIndexSortedProperties.- Parameters:
defaults- the defaults
-
-
Method Detail
-
of
public static IndexSortedProperties of()
Factory method to create a newIndexSortedPropertiesobject.- Returns:
- the new
IndexSortedPropertiesobject
-
of
public static IndexSortedProperties of(java.util.Properties defaults)
Factory method to create a newIndexSortedPropertiesobject.- Parameters:
defaults- the defaults- Returns:
- the new
IndexSortedPropertiesobject
-
of
public static IndexSortedProperties of(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator)
Factory method to create a newIndexSortedPropertiesobject.- Parameters:
defaults- the defaultscomparator- the comparator- Returns:
- the new
IndexSortedPropertiesobject
-
of
public static IndexSortedProperties of(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator, boolean nullIsGreaterThan)
Factory method to create a newIndexSortedPropertiesobject.- Parameters:
defaults- the defaultscomparator- the comparatornullIsGreaterThan- the null is greater than- Returns:
- the new
IndexSortedPropertiesobject
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
clearin classjava.util.Properties
-
get
public java.lang.Object get(int index)
Gets the entry from the given index.- Parameters:
index- the index- Returns:
- the object that was found over the index or null if the index was out of range.
-
getProperty
public java.lang.String getProperty(int index)
Gets the property over the index.- Parameters:
index- the index- Returns:
- the property that was found over the index or null if the index was out of range.
-
indexOf
public int indexOf(java.lang.Object object)
Gets the index of the given object.- Parameters:
object- the object- Returns:
- the index of the given object or -1 if not found.
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)- Specified by:
putin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putin classjava.util.Properties
-
putAll
public void putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> t)
- Specified by:
putAllin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putAllin classjava.util.Properties
-
remove
public java.lang.Object remove(int index)
Removes the entry from the given index.- Parameters:
index- the index- Returns:
- the object that was removed or null if the index was out of range.
-
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
removein interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
removein classjava.util.Properties
-
remove
public boolean remove(java.lang.Object key, java.lang.Object value)- Specified by:
removein interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
removein classjava.util.Properties
-
-