Class MapFactories
- java.lang.Object
-
- org.spongepowered.configurate.util.MapFactories
-
public final class MapFactories extends Object
Default implementations ofMapFactory.- Since:
- 4.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods 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 Detail
-
unordered
public static MapFactory unordered()
Returns aMapFactorywhich creates maps without an order.- Returns:
- a map factory which produces unordered maps
- Since:
- 4.0.0
-
sorted
public static MapFactory sorted(Comparator<Object> comparator)
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
- Since:
- 4.0.0
-
sortedNatural
public static MapFactory sortedNatural()
Returns aMapFactorywhich creates maps which are naturally sorted.- Returns:
- a map factory which produces naturally sorted maps
- Since:
- 4.0.0
- See Also:
Comparator.naturalOrder()
-
insertionOrdered
public static MapFactory insertionOrdered()
Returns aMapFactorywhich creates maps which are sorted by insertion order.- Returns:
- a map factory which produces maps sorted by insertion order
- Since:
- 4.0.0
-
-