Class DefaultStringOrArray
Object
se.curity.identityserver.sdk.data.tokens.DefaultStringOrArray
- All Implemented Interfaces:
Serializable,Comparable<StringOrArray>,StringOrArray
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(StringOrArray other) booleanReturnstrueif this StringOrArray contains the specified String value.booleangetValueOrError(Supplier<? extends NoSingleValueException> exceptionSupplier) static StringOrArrayof()static StringOrArraystatic StringOrArrayof(Collection<String> values) toString()
-
Method Details
-
of
-
of
-
of
-
getValueOrError
- Specified by:
getValueOrErrorin interfaceStringOrArray- Returns:
- single value, or null if no value was present. Throws runtime exception when more than one values exists.
- Throws:
NoSingleValueException- when no or more than one values exists
-
getValueOrError
@Nullable public @Nullable String getValueOrError(Supplier<? extends NoSingleValueException> exceptionSupplier) throws NoSingleValueException - Specified by:
getValueOrErrorin interfaceStringOrArray- Parameters:
exceptionSupplier- Supplier of a NoSingleValueException that is thrown when no or more than one values exists.- Returns:
- single value, or null if no value was present. Throws runtime exception when more than one values exists.
- Throws:
NoSingleValueException- when no or more than one values exists
-
getValues
- Specified by:
getValuesin interfaceStringOrArray- Returns:
- a list of all the values
-
toStringOrArray
- Specified by:
toStringOrArrayin interfaceStringOrArray- Returns:
- the value as a String or ArrayList type. If no value was set, null is returned.
-
contains
Description copied from interface:StringOrArrayReturnstrueif this StringOrArray contains the specified String value.- Specified by:
containsin interfaceStringOrArray- Parameters:
value- string value whose presence is to be tested- Returns:
trueif this StringOrArray contains the specified value;falseotherwise
-
toString
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<StringOrArray>
-