Class ArcCollections
java.lang.Object
com.xpdustry.distributor.common.collection.ArcCollections
A utility class for wrapping arc collections into standard java collections.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> List<E>immutableList(arc.struct.Seq<E> seq) Wraps aSeqinto an immutableList.static <E extends mindustry.gen.Entityc>
List<E>immutableList(mindustry.entities.EntityGroup<E> group) Wraps anEntityGroupinto an immutableList.static <K,V> Map<K, V> immutableMap(arc.struct.ObjectMap<K, V> map) Wraps anObjectMapinto an immutableMap.static <E> Set<E>immutableSet(arc.struct.ObjectSet<E> seq) Wraps anObjectSetinto an immutableSet.static <E> List<E>mutableList(arc.struct.Seq<E> seq) Wraps aSeqinto aList.static <E extends mindustry.gen.Entityc>
List<E>mutableList(mindustry.entities.EntityGroup<E> group) Wraps anEntityGroupinto aList.static <K,V> Map<K, V> mutableMap(arc.struct.ObjectMap<K, V> map) Wraps anObjectMapinto aMap.static <E> Set<E>mutableSet(arc.struct.ObjectSet<E> seq) Wraps anObjectSetinto aSet.
-
Method Details
-
mutableSet
Wraps anObjectSetinto aSet.- Type Parameters:
E- the element type- Parameters:
seq- the arc set- Returns:
- the wrapped set
-
immutableSet
Wraps anObjectSetinto an immutableSet.- Type Parameters:
E- the element type- Parameters:
seq- the arc set- Returns:
- the wrapped
ObjectSet
-
mutableList
Wraps aSeqinto aList.- Type Parameters:
E- the element type- Parameters:
seq- the arc list- Returns:
- the wrapped
Seq
-
immutableList
Wraps aSeqinto an immutableList.- Type Parameters:
E- the element type- Parameters:
seq- the arc list- Returns:
- the wrapped
Seq
-
mutableList
public static <E extends mindustry.gen.Entityc> List<E> mutableList(mindustry.entities.EntityGroup<E> group) Wraps anEntityGroupinto aList.- Type Parameters:
E- the entity type- Parameters:
group- the entity group- Returns:
- the wrapped
EntityGroup
-
immutableList
public static <E extends mindustry.gen.Entityc> List<E> immutableList(mindustry.entities.EntityGroup<E> group) Wraps anEntityGroupinto an immutableList.- Type Parameters:
E- the entity type- Parameters:
group- the entity group- Returns:
- the wrapped
EntityGroup
-
mutableMap
Wraps anObjectMapinto aMap.- Type Parameters:
K- the key typeV- the value type- Parameters:
map- the arc map- Returns:
- the wrapped
ObjectMap
-
immutableMap
Wraps anObjectMapinto an immutableMap.- Type Parameters:
K- the key typeV- the value type- Parameters:
map- the arc map- Returns:
- the wrapped
ObjectMap
-