Class 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 class IndexSortedProperties extends SortedProperties and holds an intern list with the keys for get values over an index.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.Properties

        defaults
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      java.lang.Object get​(int index)
      Gets the entry from the given index.
      java.lang.String getProperty​(int index)
      Gets the property over the index.
      int indexOf​(java.lang.Object object)
      Gets the index of the given object.
      static IndexSortedProperties of()
      Factory method to create a new IndexSortedProperties object.
      static IndexSortedProperties of​(java.util.Properties defaults)
      Factory method to create a new IndexSortedProperties object.
      static IndexSortedProperties of​(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator)
      Factory method to create a new IndexSortedProperties object.
      static IndexSortedProperties of​(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator, boolean nullIsGreaterThan)
      Factory method to create a new IndexSortedProperties object.
      java.lang.Object put​(java.lang.Object key, java.lang.Object value)
      void putAll​(java.util.Map<? extends java.lang.Object,​? extends java.lang.Object> t)
      java.lang.Object remove​(int index)
      Removes the entry from the given index.
      java.lang.Object remove​(java.lang.Object key)
      boolean remove​(java.lang.Object key, java.lang.Object value)
      • 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
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IndexSortedProperties

        public IndexSortedProperties​(java.util.Properties defaults)
        Instantiates a new IndexSortedProperties.
        Parameters:
        defaults - the defaults
    • Method Detail

      • of

        public static IndexSortedProperties of​(java.util.Properties defaults,
                                               java.util.Comparator<java.lang.Object> comparator,
                                               boolean nullIsGreaterThan)
        Factory method to create a new IndexSortedProperties object.
        Parameters:
        defaults - the defaults
        comparator - the comparator
        nullIsGreaterThan - the null is greater than
        Returns:
        the new IndexSortedProperties object
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        clear in class java.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:
        put in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        put in class java.util.Properties
      • putAll

        public void putAll​(java.util.Map<? extends java.lang.Object,​? extends java.lang.Object> t)
        Specified by:
        putAll in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        putAll in class java.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:
        remove in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        remove in class java.util.Properties
      • remove

        public boolean remove​(java.lang.Object key,
                              java.lang.Object value)
        Specified by:
        remove in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        remove in class java.util.Properties