Package ninja.leaping.configurate.util
Class MapFactories
java.lang.Object
ninja.leaping.configurate.util.MapFactories
public final class MapFactories extends Object
Default implementations of
MapFactory.-
Method Summary
Modifier and Type Method Description static MapFactoryinsertionOrdered()Returns aMapFactorywhich creates maps which are sorted by insertion order.static MapFactorysorted(Comparator<Object> comparator)Returns aMapFactorywhich creates maps which are sorted using the given comparator.static MapFactorysortedNatural()Returns aMapFactorywhich creates maps which are naturally sorted.static MapFactoryunordered()Returns aMapFactorywhich creates maps without an order.
-
Method Details
-
unordered
Returns aMapFactorywhich creates maps without an order.- Returns:
- A map factory which produces unordered maps
-
sorted
Returns aMapFactorywhich creates maps which are sorted using the given comparator.- Parameters:
comparator- The comparator used to sort the map keys- Returns:
- A map factory which produces sorted maps
-
sortedNatural
Returns aMapFactorywhich creates maps which are naturally sorted.- Returns:
- A map factory which produces naturally sorted maps
- See Also:
Comparator.naturalOrder()
-
insertionOrdered
Returns aMapFactorywhich creates maps which are sorted by insertion order.- Returns:
- A map factory which produces maps sorted by insertion order
-