Package net.minecraft.util.collection
Class TypeFilterableList<T>
java.lang.Object
java.util.AbstractCollection<T>
net.minecraft.util.collection.TypeFilterableList<T>
- Type Parameters:
T- thecommon element type
- All Implemented Interfaces:
Iterable<T>,Collection<T>
A collection allowing getting all elements of a specific type. Backed
by
ArrayLists.
This implementation is not efficient for frequent modifications. You
shouldn't use this if you don't call getAllOfType(Class).
- See Also:
- Mappings:
Namespace Name intermediary net/minecraft/class_3509official anvnamed net/minecraft/util/collection/TypeFilterableList
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
elementsByType
- Mappings:
Namespace Name Mixin selector intermediary field_15636Lnet/minecraft/class_3509;field_15636:Ljava/util/Map;official aLanv;a:Ljava/util/Map;named elementsByTypeLnet/minecraft/util/collection/TypeFilterableList;elementsByType:Ljava/util/Map;
-
elementType
- Mappings:
Namespace Name Mixin selector intermediary field_15637Lnet/minecraft/class_3509;field_15637:Ljava/lang/Class;official bLanv;b:Ljava/lang/Class;named elementTypeLnet/minecraft/util/collection/TypeFilterableList;elementType:Ljava/lang/Class;
-
allElements
- Mappings:
Namespace Name Mixin selector intermediary field_15635Lnet/minecraft/class_3509;field_15635:Ljava/util/List;official cLanv;c:Ljava/util/List;named allElementsLnet/minecraft/util/collection/TypeFilterableList;allElements:Ljava/util/List;
-
-
Constructor Details
-
TypeFilterableList
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_3509;<init>(Ljava/lang/Class;)Vofficial <init>Lanv;<init>(Ljava/lang/Class;)Vnamed <init>Lnet/minecraft/util/collection/TypeFilterableList;<init>(Ljava/lang/Class;)V
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection<T>- Overrides:
addin classAbstractCollection<T>- Mappings:
Namespace Name Mixin selector intermediary addLnet/minecraft/class_3509;add(Ljava/lang/Object;)Zofficial addLanv;add(Ljava/lang/Object;)Znamed addLnet/minecraft/util/collection/TypeFilterableList;add(Ljava/lang/Object;)Z
-
remove
- Specified by:
removein interfaceCollection<T>- Overrides:
removein classAbstractCollection<T>- Mappings:
Namespace Name Mixin selector intermediary removeLnet/minecraft/class_3509;remove(Ljava/lang/Object;)Zofficial removeLanv;remove(Ljava/lang/Object;)Znamed removeLnet/minecraft/util/collection/TypeFilterableList;remove(Ljava/lang/Object;)Z
-
contains
- Specified by:
containsin interfaceCollection<T>- Overrides:
containsin classAbstractCollection<T>- Throws:
IllegalArgumentException- ifois not an instance ofelementType- Mappings:
Namespace Name Mixin selector intermediary containsLnet/minecraft/class_3509;contains(Ljava/lang/Object;)Zofficial containsLanv;contains(Ljava/lang/Object;)Znamed containsLnet/minecraft/util/collection/TypeFilterableList;contains(Ljava/lang/Object;)Z
-
getAllOfType
Returns all elements in this collection that are instances oftype. The result is unmodifiable.The
type, orS, must extend the class' type parameterT.- Type Parameters:
S- the specialized type, effectivelyS extends T- Parameters:
type- the specialized type, must extendelementType- Returns:
- this collection's elements that are instances of
type - Throws:
IllegalArgumentException- whentypedoes not extendelementType- Mappings:
Namespace Name Mixin selector intermediary method_15216Lnet/minecraft/class_3509;method_15216(Ljava/lang/Class;)Ljava/util/Collection;official aLanv;a(Ljava/lang/Class;)Ljava/util/Collection;named getAllOfTypeLnet/minecraft/util/collection/TypeFilterableList;getAllOfType(Ljava/lang/Class;)Ljava/util/Collection;
-
iterator
- Specified by:
iteratorin interfaceCollection<T>- Specified by:
iteratorin interfaceIterable<T>- Specified by:
iteratorin classAbstractCollection<T>
-
copy
- Mappings:
Namespace Name Mixin selector intermediary method_34897Lnet/minecraft/class_3509;method_34897()Ljava/util/List;official aLanv;a()Ljava/util/List;named copyLnet/minecraft/util/collection/TypeFilterableList;copy()Ljava/util/List;
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein classAbstractCollection<T>
-