Class PrioritizedComponents<T>

java.lang.Object
org.eclipse.aether.internal.impl.PrioritizedComponents<T>
Type Parameters:
T - The component type.

public final class PrioritizedComponents<T> extends Object
Helps to sort pluggable components by their priority.
  • Method Details

    • reuseOrCreate

      public static <C> PrioritizedComponents<C> reuseOrCreate(org.eclipse.aether.RepositorySystemSession session, Map<String,C> components, Function<C,Float> priorityFunction)
      Reuses or creates and stores (if session data does not contain yet) prioritized components under this key into given session. Same session is used to configure prioritized components.

      The components are expected to be Sisu injected Map<String,C>-like component maps. There is a simple "change detection" in place, as injected maps are dynamic, they are atomically expanded or contracted as components are dynamically discovered or unloaded.

      Since:
      2.0.0
    • add

      public void add(T component, float priority)
    • isEmpty

      public boolean isEmpty()
    • getAll

    • getEnabled

    • list

      public void list(StringBuilder buffer)
    • toString

      public String toString()
      Overrides:
      toString in class Object