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
ArrayList
s.
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 named net/minecraft/util/collection/TypeFilterableList
intermediary net/minecraft/class_3509
official axr
-
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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
elementsByType
- Mappings:
Namespace Name Mixin selector named elementsByType
Lnet/minecraft/util/collection/TypeFilterableList;elementsByType:Ljava/util/Map;
intermediary field_15636
Lnet/minecraft/class_3509;field_15636:Ljava/util/Map;
official a
Laxr;a:Ljava/util/Map;
-
elementType
- Mappings:
Namespace Name Mixin selector named elementType
Lnet/minecraft/util/collection/TypeFilterableList;elementType:Ljava/lang/Class;
intermediary field_15637
Lnet/minecraft/class_3509;field_15637:Ljava/lang/Class;
official b
Laxr;b:Ljava/lang/Class;
-
allElements
- Mappings:
Namespace Name Mixin selector named allElements
Lnet/minecraft/util/collection/TypeFilterableList;allElements:Ljava/util/List;
intermediary field_15635
Lnet/minecraft/class_3509;field_15635:Ljava/util/List;
official c
Laxr;c:Ljava/util/List;
-
-
Constructor Details
-
TypeFilterableList
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/util/collection/TypeFilterableList;<init>(Ljava/lang/Class;)V
intermediary <init>
Lnet/minecraft/class_3509;<init>(Ljava/lang/Class;)V
official <init>
Laxr;<init>(Ljava/lang/Class;)V
-
-
Method Details
-
add
- Specified by:
add
in interfaceCollection<T>
- Overrides:
add
in classAbstractCollection<T>
- Mappings:
Namespace Name Mixin selector named add
Lnet/minecraft/util/collection/TypeFilterableList;add(Ljava/lang/Object;)Z
intermediary add
Lnet/minecraft/class_3509;add(Ljava/lang/Object;)Z
official add
Laxr;add(Ljava/lang/Object;)Z
-
remove
- Specified by:
remove
in interfaceCollection<T>
- Overrides:
remove
in classAbstractCollection<T>
- Mappings:
Namespace Name Mixin selector named remove
Lnet/minecraft/util/collection/TypeFilterableList;remove(Ljava/lang/Object;)Z
intermediary remove
Lnet/minecraft/class_3509;remove(Ljava/lang/Object;)Z
official remove
Laxr;remove(Ljava/lang/Object;)Z
-
contains
- Specified by:
contains
in interfaceCollection<T>
- Overrides:
contains
in classAbstractCollection<T>
- Throws:
IllegalArgumentException
- ifo
is not an instance ofelementType
- Mappings:
Namespace Name Mixin selector named contains
Lnet/minecraft/util/collection/TypeFilterableList;contains(Ljava/lang/Object;)Z
intermediary contains
Lnet/minecraft/class_3509;contains(Ljava/lang/Object;)Z
official contains
Laxr;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
- whentype
does not extendelementType
- Mappings:
Namespace Name Mixin selector named getAllOfType
Lnet/minecraft/util/collection/TypeFilterableList;getAllOfType(Ljava/lang/Class;)Ljava/util/Collection;
intermediary method_15216
Lnet/minecraft/class_3509;method_15216(Ljava/lang/Class;)Ljava/util/Collection;
official a
Laxr;a(Ljava/lang/Class;)Ljava/util/Collection;
-
iterator
- Specified by:
iterator
in interfaceCollection<T>
- Specified by:
iterator
in interfaceIterable<T>
- Specified by:
iterator
in classAbstractCollection<T>
-
copy
- Mappings:
Namespace Name Mixin selector named copy
Lnet/minecraft/util/collection/TypeFilterableList;copy()Ljava/util/List;
intermediary method_34897
Lnet/minecraft/class_3509;method_34897()Ljava/util/List;
official a
Laxr;a()Ljava/util/List;
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in classAbstractCollection<T>
-