public final class Expressions extends Object
ValueOrExpression
Modifier and Type | Method and Description |
---|---|
static <T> Collection<ValueOrExpression<T>> |
asSetOfValueOrExpression(Collection<T> values)
Returns a collection of wrapped values from the provided collection of values.
|
static <T> Collection<ValueOrExpression<T>> |
asSetOfValueOrExpression(T... values)
Returns a collection of wrapped values from the provided values.
|
static <T extends Comparable<T>> |
getValuesOrThrowIfExpression(Collection<ValueOrExpression<T>> wrappedValues)
Returns a sorted set containing values from the provided collection of wrapped values.
|
static <T> SortedSet<T> |
getValuesOrThrowIfExpression(Collection<ValueOrExpression<T>> wrappedValues,
Comparator<T> comparator)
Returns a sorted set containing values from the provided collection of wrapped values.
|
public static <T> SortedSet<T> getValuesOrThrowIfExpression(Collection<ValueOrExpression<T>> wrappedValues, Comparator<T> comparator) throws ExpressionException
This method must be used when type T is not comparable. If T is comparable, then equivalent method without a comparator argument can be used.
T
- The type of the values, which need not be comparable.wrappedValues
- The wrapped values to be sorted.comparator
- The comparator for values of type T.ExpressionException
- If the set contains an expression.public static <T extends Comparable<T>> SortedSet<T> getValuesOrThrowIfExpression(Collection<ValueOrExpression<T>> wrappedValues) throws ExpressionException
This method can only be used when type T is comparable. If T is not comparable, then the equivalent method with the comparator argument must be used.
T
- The type of the values, which need not be comparable.wrappedValues
- The wrapped values to be sorted.ExpressionException
- if the set contains an expressionpublic static <T> Collection<ValueOrExpression<T>> asSetOfValueOrExpression(Collection<T> values)
T
- the type of the valuesvalues
- values to wrap@SafeVarargs public static <T> Collection<ValueOrExpression<T>> asSetOfValueOrExpression(T... values)
T
- the type of the valuesvalues
- values to wrapCopyright 2010-2018 ForgeRock AS.