T - the type of SCMTrait specialization.public abstract class SCMTrait<T extends SCMTrait<T>> extends AbstractDescribableImpl<T>
| Constructor and Description |
|---|
SCMTrait() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends SCMTrait<?>> |
asSetList(Iterable<? extends T> list)
Converts the supplied list of
SCMTrait instances into a list where there is at most one instance of
each trait. |
static <T extends SCMTrait<?>> |
asSetList(T first,
Iterable<? extends T> list)
Converts the supplied instance and list of
SCMTrait instances into a list where there is at most one
instance of each trait. |
static <T extends SCMTrait<?>> |
find(Iterable<?> traits,
Class<T> clazz)
Finds the trait of the required type.
|
SCMTraitDescriptor<T> |
getDescriptor() |
public SCMTraitDescriptor<T> getDescriptor()
getDescriptor in interface Describable<T extends SCMTrait<T>>getDescriptor in class AbstractDescribableImpl<T extends SCMTrait<T>>@NonNull public static <T extends SCMTrait<?>> ArrayList<T> asSetList(@CheckForNull Iterable<? extends T> list)
SCMTrait instances into a list where there is at most one instance of
each trait.T - type of SCMTrait.list - the list to apply the constraint to.public static <T extends SCMTrait<?>> ArrayList<T> asSetList(@NonNull T first, @CheckForNull Iterable<? extends T> list)
SCMTrait instances into a list where there is at most one
instance of each trait.T - type of SCMTrait.first - an entry to prepend to the list (will displace any duplicates in the list)list - the list to apply the constraint to.@CheckForNull public static <T extends SCMTrait<?>> T find(@NonNull Iterable<?> traits, @NonNull Class<T> clazz)
T - the type of trait.traits - the traits to search.clazz - the type of trait.null if there is no matching trait.Copyright © 2016–2019. All rights reserved.