Interface FilterableList<T,S extends FilterableList<T,S>>

Type Parameters:
T - The type of the collection's elements.
S - The type of this list.
All Superinterfaces:
Collection<T>, Iterable<T>, List<T>
All Known Subinterfaces:
AnnotationList, FieldList<T>, MethodList<T>, ParameterList<T>, RecordComponentList<T>, TypeList, TypeList.Generic
All Known Implementing Classes:
AnnotationList.AbstractBase, AnnotationList.Empty, AnnotationList.Explicit, AnnotationList.ForLoadedAnnotations, ByteCodeElement.Token.TokenList, FieldList.AbstractBase, FieldList.Empty, FieldList.Explicit, FieldList.ForLoadedFields, FieldList.ForTokens, FieldList.TypeSubstituting, FilterableList.AbstractBase, FilterableList.Empty, MethodGraph.NodeList, MethodList.AbstractBase, MethodList.Empty, MethodList.Explicit, MethodList.ForLoadedMethods, MethodList.ForTokens, MethodList.TypeSubstituting, ParameterList.AbstractBase, ParameterList.Empty, ParameterList.Explicit, ParameterList.Explicit.ForTypes, ParameterList.ForLoadedExecutable, ParameterList.ForLoadedExecutable.OfConstructor, ParameterList.ForLoadedExecutable.OfLegacyVmConstructor, ParameterList.ForLoadedExecutable.OfLegacyVmMethod, ParameterList.ForLoadedExecutable.OfMethod, ParameterList.ForTokens, ParameterList.TypeSubstituting, RecordComponentList.AbstractBase, RecordComponentList.Empty, RecordComponentList.Explicit, RecordComponentList.ForLoadedRecordComponents, RecordComponentList.ForTokens, RecordComponentList.TypeSubstituting, Transformer.ForMethod.TransformedMethod.TransformedParameterList, TypeDescription.Generic.LazyProjection.WithLazyNavigation.LazyInterfaceList, TypeDescription.Generic.OfParameterizedType.ForLoadedType.ParameterArgumentTypeList, TypeDescription.Generic.OfTypeVariable.ForLoadedType.TypeVariableBoundList, TypeDescription.Generic.OfWildcardType.ForLoadedType.WildcardLowerBoundTypeList, TypeDescription.Generic.OfWildcardType.ForLoadedType.WildcardUpperBoundTypeList, TypeDescription.SuperTypeLoading.ClassLoadingTypeList, TypeList.AbstractBase, TypeList.Empty, TypeList.Explicit, TypeList.ForLoadedTypes, TypeList.Generic.AbstractBase, TypeList.Generic.Empty, TypeList.Generic.Explicit, TypeList.Generic.ForDetachedTypes, TypeList.Generic.ForDetachedTypes.OfTypeVariables, TypeList.Generic.ForDetachedTypes.WithResolvedErasure, TypeList.Generic.ForLoadedTypes, TypeList.Generic.ForLoadedTypes.OfTypeVariables, TypeList.Generic.OfConstructorExceptionTypes, TypeList.Generic.OfLoadedInterfaceTypes, TypeList.Generic.OfMethodExceptionTypes, TypePool.Default.LazyTypeDescription.FieldTokenList, TypePool.Default.LazyTypeDescription.GenericTypeToken.ForTypeVariable.Formal.LazyTypeVariable.LazyBoundTokenList, TypePool.Default.LazyTypeDescription.GenericTypeToken.LazyTokenList, TypePool.Default.LazyTypeDescription.GenericTypeToken.LazyTokenList.ForWildcardBound, TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.Raw.RawAnnotatedType.LazyRawAnnotatedTypeList, TypePool.Default.LazyTypeDescription.LazyMethodDescription.LazyParameterizedReceiverType.TypeArgumentList, TypePool.Default.LazyTypeDescription.LazyMethodDescription.LazyParameterList, TypePool.Default.LazyTypeDescription.LazyNestMemberList, TypePool.Default.LazyTypeDescription.LazyTypeList, TypePool.Default.LazyTypeDescription.MethodTokenList, TypePool.Default.LazyTypeDescription.RecordComponentTokenList, TypePool.Default.LazyTypeDescription.TokenizedGenericType.Malformed.TokenList, TypePool.Default.LazyTypeDescription.TokenizedGenericType.TokenList, TypePool.Default.LazyTypeDescription.TokenizedGenericType.TypeVariableList, TypeWriter.Default.ForInlining.WithDecorationOnly.LazyFieldList

public interface FilterableList<T,S extends FilterableList<T,S>> extends List<T>
A filterable list allows to use an ElementMatcher to reduce a lists to elements that are matched by this matcher in this list.
  • Method Details

    • filter

      S filter(ElementMatcher<? super T> elementMatcher)
      Filters any elements in this lists by the given elementMatcher and returns a list that are matched by the given matcher.
      Parameters:
      elementMatcher - The element matcher to match the elements of this list against.
      Returns:
      A new list only containing the matched elements.
    • getOnly

      T getOnly()
      Returns the only element of this list. If there is not exactly one element in this list, an IllegalStateException is thrown.
      Returns:
      The only element of this list.
    • subList

      S subList(int fromIndex, int toIndex)
      Specified by:
      subList in interface List<T>