类 CompositeStrategies<T>

java.lang.Object
cn.taketoday.core.CompositeStrategies<T>
所有已实现的接口:
ArraySizeTrimmer, Iterable<T>

public class CompositeStrategies<T> extends Object implements ArraySizeTrimmer, Iterable<T>
从以下版本开始:
4.0
作者:
TODAY 2021/10/2 20:44
  • 构造器详细资料

    • CompositeStrategies

      public CompositeStrategies()
    • CompositeStrategies

      public CompositeStrategies(int size)
  • 方法详细资料

    • add

      public void add(T resolver)
    • add

      @SafeVarargs public final void add(T... resolver)
      add resolvers or resolving-strategies
      参数:
      resolver - resolvers or resolving-strategies
    • add

      public void add(List<T> resolvers)
      add resolvers or resolving-strategies
      参数:
      resolvers - resolvers or resolving-strategies
    • set

      public void set(@Nullable List<T> resolver)
      set or clear resolvers
      参数:
      resolver - can be null
    • removeIf

      public boolean removeIf(Predicate<T> filter)
      Removes all the elements of this collection that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller.
      参数:
      filter - a predicate which returns true for elements to be removed
      返回:
      true if any elements were removed
      抛出:
      NullPointerException - if the specified filter is null
      UnsupportedOperationException - if elements cannot be removed from this collection. Implementations may throw this exception if a matching element cannot be removed or if, in general, removal is not supported.
    • contains

      public boolean contains(Class<?> strategy)
      Returns true if resolvers list contains the specified resolverClass. More formally, returns true if and only if all resolvers contains at least one element e such that (resolverClass == resolver.getClass()).
      参数:
      strategy - element whose presence in this strategies
      返回:
      true if resolvers contains the specified resolverClass
    • getStrategies

      public ArrayList<T> getStrategies()
    • trimToSize

      public void trimToSize()
      从接口复制的说明: ArraySizeTrimmer
      Trims the capacity of this instance's (list or array) to its size. An application can use this operation to minimize the storage of this instance.
      指定者:
      trimToSize 在接口中 ArraySizeTrimmer
    • iterator

      public Iterator<T> iterator()
      指定者:
      iterator 在接口中 Iterable<T>
    • forEach

      public void forEach(Consumer<? super T> action)
      指定者:
      forEach 在接口中 Iterable<T>
    • spliterator

      public Spliterator<T> spliterator()
      指定者:
      spliterator 在接口中 Iterable<T>