类 TypeFilterableList<T>

  • 类型参数:
    T - the common element type
    所有已实现的接口:
    Iterable<T>, Collection<T>

    public class TypeFilterableList<T>
    extends AbstractCollection<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).

    另请参阅:
    getAllOfType(Class)
    Mappings:
    Namespace Name
    official afz
    intermediary net/minecraft/class_3509
    named net/minecraft/util/collection/TypeFilterableList
    • 字段详细资料

      • elementsByType

        private final Map<Class<?>,​List<T>> elementsByType
        Mappings:
        Namespace Name Mixin selector
        official a Lafz;a:Ljava/util/Map;
        intermediary field_15636 Lnet/minecraft/class_3509;field_15636:Ljava/util/Map;
        named elementsByType Lnet/minecraft/util/collection/TypeFilterableList;elementsByType:Ljava/util/Map;
      • elementType

        private final Class<T> elementType
        Mappings:
        Namespace Name Mixin selector
        official b Lafz;b:Ljava/lang/Class;
        intermediary field_15637 Lnet/minecraft/class_3509;field_15637:Ljava/lang/Class;
        named elementType Lnet/minecraft/util/collection/TypeFilterableList;elementType:Ljava/lang/Class;
      • allElements

        private final List<T> allElements
        Mappings:
        Namespace Name Mixin selector
        official c Lafz;c:Ljava/util/List;
        intermediary field_15635 Lnet/minecraft/class_3509;field_15635:Ljava/util/List;
        named allElements Lnet/minecraft/util/collection/TypeFilterableList;allElements:Ljava/util/List;
    • 构造器详细资料

      • TypeFilterableList

        public TypeFilterableList​(Class<T> elementType)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lafz;<init>(Ljava/lang/Class;)V
        intermediary <init> Lnet/minecraft/class_3509;<init>(Ljava/lang/Class;)V
        named <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 add Lafz;add(Ljava/lang/Object;)Z
        intermediary add Lnet/minecraft/class_3509;add(Ljava/lang/Object;)Z
        named add Lnet/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 remove Lafz;remove(Ljava/lang/Object;)Z
        intermediary remove Lnet/minecraft/class_3509;remove(Ljava/lang/Object;)Z
        named remove Lnet/minecraft/util/collection/TypeFilterableList;remove(Ljava/lang/Object;)Z
      • contains

        public boolean contains​(Object o)
        指定者:
        contains 在接口中 Collection<T>
        覆盖:
        contains 在类中 AbstractCollection<T>
        抛出:
        IllegalArgumentException - if o is not an instance of elementType
        Mappings:
        Namespace Name Mixin selector
        official contains Lafz;contains(Ljava/lang/Object;)Z
        intermediary contains Lnet/minecraft/class_3509;contains(Ljava/lang/Object;)Z
        named contains Lnet/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 of type. The result is unmodifiable.

        The type, or S, must extend the class' type parameter T.

        类型参数:
        S - the specialized type, effectively S extends T
        参数:
        type - the specialized type, must extend elementType
        返回:
        this collection's elements that are instances of type
        抛出:
        IllegalArgumentException - when type does not extend elementType
        Mappings:
        Namespace Name Mixin selector
        official a Lafz;a(Ljava/lang/Class;)Ljava/util/Collection;
        intermediary method_15216 Lnet/minecraft/class_3509;method_15216(Ljava/lang/Class;)Ljava/util/Collection;
        named getAllOfType Lnet/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 iterator Lafz;iterator()Ljava/util/Iterator;
        intermediary iterator Lnet/minecraft/class_3509;iterator()Ljava/util/Iterator;
        named iterator Lnet/minecraft/util/collection/TypeFilterableList;iterator()Ljava/util/Iterator;
      • copy

        public List<T> copy()
        Mappings:
        Namespace Name Mixin selector
        official a Lafz;a()Ljava/util/List;
        intermediary method_34897 Lnet/minecraft/class_3509;method_34897()Ljava/util/List;
        named copy Lnet/minecraft/util/collection/TypeFilterableList;copy()Ljava/util/List;
      • size

        public int size()
        指定者:
        size 在接口中 Collection<T>
        指定者:
        size 在类中 AbstractCollection<T>
        Mappings:
        Namespace Name Mixin selector
        official size Lafz;size()I
        intermediary size Lnet/minecraft/class_3509;size()I
        named size Lnet/minecraft/util/collection/TypeFilterableList;size()I