public class GroupSortedProperties extends OrderedProperties
OrderedProperties implementation that sorts the elements by key by
grouping the keys into groups separated by "." and "-".
Integer groups are sorted numerically, all other groups are sorted
lexicographically. When comparing an integer group with a non-integer group,
integer groups are sorted last.
The elements are sorted when iterator() is called instead of every
time a key/value pair is added.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
GroupSortedProperties.Entry
A
Serializable GroupSortedProperties.Entry implementation that has an
accessible constructor. |
protected static class |
GroupSortedProperties.EntryComparator
A
Comparator that sorts GroupSortedProperties.Entry elements by key by grouping
the keys into groups separated by ".". |
OrderedProperties.LineReader| Modifier and Type | Field and Description |
|---|---|
protected static GroupSortedProperties.EntryComparator |
COMPARATOR
The static
GroupSortedProperties.EntryComparator instance. |
| Constructor and Description |
|---|
GroupSortedProperties() |
| Modifier and Type | Method and Description |
|---|---|
Iterator<Map.Entry<String,String>> |
iterator() |
String |
put(String key,
String value)
Associates the specified
value with the specified key. |
doLoad, load, load, loadConvert, saveConvert, store, store, store, toHex, writeComment, writeNewLineprotected static final GroupSortedProperties.EntryComparator COMPARATOR
GroupSortedProperties.EntryComparator instance.public String put(String key, String value)
OrderedPropertiesvalue with the specified key. If
there previously was a mapping for the key, the old value is replaced.put in class OrderedPropertieskey - the key with which the specified value is to be associatedvalue - value to be associated with the specified key.key, or null
if there was no mapping for key or the previously
associated value was null.Copyright © 2024. All rights reserved.