类 TypeFilterableList<T>
- java.lang.Object
-
- java.util.AbstractCollection<T>
-
- net.minecraft.util.collection.TypeFilterableList<T>
-
- 类型参数:
T- thecommon element type
- 所有已实现的接口:
Iterable<T>,Collection<T>
public class TypeFilterableList<T> extends AbstractCollection<T>
A collection allowing getting all elements of a specific type. Backed byArrayLists.This implementation is not efficient for frequent modifications. You shouldn't use this if you don't call
getAllOfType(Class).- 另请参阅:
getAllOfType(Class)- Mappings:
Namespace Name official afzintermediary net/minecraft/class_3509named net/minecraft/util/collection/TypeFilterableList
-
-
字段概要
字段 修饰符和类型 字段 说明 private List<T>allElementsprivate Map<Class<?>,List<T>>elementsByTypeprivate Class<T>elementType
-
构造器概要
构造器 构造器 说明 TypeFilterableList(Class<T> elementType)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanadd(T e)booleancontains(Object o)List<T>copy()<S> Collection<S>getAllOfType(Class<S> type)Returns all elements in this collection that are instances oftype.Iterator<T>iterator()booleanremove(Object o)intsize()-
从类继承的方法 java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
字段详细资料
-
elementsByType
private final Map<Class<?>,List<T>> elementsByType
- Mappings:
Namespace Name Mixin selector official aLafz;a:Ljava/util/Map;intermediary field_15636Lnet/minecraft/class_3509;field_15636:Ljava/util/Map;named elementsByTypeLnet/minecraft/util/collection/TypeFilterableList;elementsByType:Ljava/util/Map;
-
elementType
private final Class<T> elementType
- Mappings:
Namespace Name Mixin selector official bLafz;b:Ljava/lang/Class;intermediary field_15637Lnet/minecraft/class_3509;field_15637:Ljava/lang/Class;named elementTypeLnet/minecraft/util/collection/TypeFilterableList;elementType:Ljava/lang/Class;
-
-
构造器详细资料
-
TypeFilterableList
public TypeFilterableList(Class<T> elementType)
- Mappings:
Namespace Name Mixin selector official <init>Lafz;<init>(Ljava/lang/Class;)Vintermediary <init>Lnet/minecraft/class_3509;<init>(Ljava/lang/Class;)Vnamed <init>Lnet/minecraft/util/collection/TypeFilterableList;<init>(Ljava/lang/Class;)V
-
-
方法详细资料
-
add
public boolean add(T e)
- 指定者:
add在接口中Collection<T>- 覆盖:
add在类中AbstractCollection<T>- Mappings:
Namespace Name Mixin selector official addLafz;add(Ljava/lang/Object;)Zintermediary addLnet/minecraft/class_3509;add(Ljava/lang/Object;)Znamed addLnet/minecraft/util/collection/TypeFilterableList;add(Ljava/lang/Object;)Z
-
remove
public boolean remove(Object o)
- 指定者:
remove在接口中Collection<T>- 覆盖:
remove在类中AbstractCollection<T>- Mappings:
Namespace Name Mixin selector official removeLafz;remove(Ljava/lang/Object;)Zintermediary removeLnet/minecraft/class_3509;remove(Ljava/lang/Object;)Znamed removeLnet/minecraft/util/collection/TypeFilterableList;remove(Ljava/lang/Object;)Z
-
contains
public boolean contains(Object o)
- 指定者:
contains在接口中Collection<T>- 覆盖:
contains在类中AbstractCollection<T>- 抛出:
IllegalArgumentException- ifois not an instance ofelementType- Mappings:
Namespace Name Mixin selector official containsLafz;contains(Ljava/lang/Object;)Zintermediary containsLnet/minecraft/class_3509;contains(Ljava/lang/Object;)Znamed containsLnet/minecraft/util/collection/TypeFilterableList;contains(Ljava/lang/Object;)Z
-
getAllOfType
public <S> Collection<S> getAllOfType(Class<S> type)
Returns all elements in this collection that are instances oftype. The result is unmodifiable.The
type, orS, must extend the class' type parameterT.- 类型参数:
S- the specialized type, effectivelyS extends T- 参数:
type- the specialized type, must extendelementType- 返回:
- this collection's elements that are instances of
type - 抛出:
IllegalArgumentException- whentypedoes not extendelementType- Mappings:
Namespace Name Mixin selector official aLafz;a(Ljava/lang/Class;)Ljava/util/Collection;intermediary method_15216Lnet/minecraft/class_3509;method_15216(Ljava/lang/Class;)Ljava/util/Collection;named getAllOfTypeLnet/minecraft/util/collection/TypeFilterableList;getAllOfType(Ljava/lang/Class;)Ljava/util/Collection;
-
iterator
public Iterator<T> iterator()
- 指定者:
iterator在接口中Collection<T>- 指定者:
iterator在接口中Iterable<T>- 指定者:
iterator在类中AbstractCollection<T>- Mappings:
Namespace Name Mixin selector official iteratorLafz;iterator()Ljava/util/Iterator;intermediary iteratorLnet/minecraft/class_3509;iterator()Ljava/util/Iterator;named iteratorLnet/minecraft/util/collection/TypeFilterableList;iterator()Ljava/util/Iterator;
-
copy
public List<T> copy()
- Mappings:
Namespace Name Mixin selector official aLafz;a()Ljava/util/List;intermediary method_34897Lnet/minecraft/class_3509;method_34897()Ljava/util/List;named copyLnet/minecraft/util/collection/TypeFilterableList;copy()Ljava/util/List;
-
size
public int size()
- 指定者:
size在接口中Collection<T>- 指定者:
size在类中AbstractCollection<T>- Mappings:
Namespace Name Mixin selector official sizeLafz;size()Iintermediary sizeLnet/minecraft/class_3509;size()Inamed sizeLnet/minecraft/util/collection/TypeFilterableList;size()I
-
-