E
- List elements typepublic class DefaultCollectionConstantExpression<E> extends ArrayList<E> implements CollectionConstantExpression<E>
CollectionConstantExpression
implementation.Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException
Constructor and Description |
---|
DefaultCollectionConstantExpression(Collection<? extends E> values)
Constructor with a collection of values.
|
DefaultCollectionConstantExpression(E... values)
Constructor with an array of values.
|
DefaultCollectionConstantExpression(TypedExpression<E> expression,
Collection<? extends E> values)
Constructor with a collection of values.
|
DefaultCollectionConstantExpression(TypedExpression<E> expression,
E... values)
Constructor with an array of values.
|
Modifier and Type | Method and Description |
---|---|
Optional<ExpressionValueConverter<E,?>> |
getExpressionValueConverter()
Get the expression value type converter, if available.
|
Collection<?> |
getModelValue()
Get the model data type value, using the
ExpressionValueConverter to convert constant expression value,
if available. |
Optional<TemporalType> |
getTemporalType()
If the expression type represents a temporal type, get the actual
TemporalType of the type. |
Class<? extends E> |
getType()
Get the expression type.
|
List<E> |
getValue()
Get the constant expression value
|
void |
setTemporalType(TemporalType temporalType)
Set the expression value temporal type.
|
String |
toString() |
void |
validate()
Validate this expression.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
create, create, create, create, hasValues
create
getModelType, getModelValue
isCollectionExpression, isConverterExpression
containsAll, equals, hashCode
parallelStream, stream
public DefaultCollectionConstantExpression(Collection<? extends E> values)
values
- Constant expression values@SafeVarargs public DefaultCollectionConstantExpression(E... values)
values
- Constant expression values@SafeVarargs public DefaultCollectionConstantExpression(TypedExpression<E> expression, E... values)
expression
- Optional expression from which to inherit an ExpressionValueConverter
, if available.values
- Constant expression valuespublic DefaultCollectionConstantExpression(TypedExpression<E> expression, Collection<? extends E> values)
expression
- Optional expression from which to inherit an ExpressionValueConverter
, if available.values
- Constant expression valuespublic List<E> getValue()
ConstantConverterExpression
getValue
in interface ConstantConverterExpression<Collection<E>,E>
public Collection<?> getModelValue()
ConstantConverterExpression
ExpressionValueConverter
to convert constant expression value,
if available. If an ExpressionValueConverter
is not available, the original expression value is returned.getModelValue
in interface CollectionConstantExpression<E>
getModelValue
in interface ConstantConverterExpression<Collection<E>,E>
ExpressionValueConverter
is available, otherwise
ConstantConverterExpression.getValue()
is returned.public Optional<ExpressionValueConverter<E,?>> getExpressionValueConverter()
ConverterExpression
getExpressionValueConverter
in interface ConverterExpression<E>
ExpressionValueConverter
public void validate() throws Expression.InvalidExpressionException
Expression
validate
in interface Expression
Expression.InvalidExpressionException
- If the expression is not validpublic Class<? extends E> getType()
TypedExpression
getType
in interface TypedExpression<E>
public void setTemporalType(TemporalType temporalType)
temporalType
- the temporal type to setpublic Optional<TemporalType> getTemporalType()
TypedExpression
TemporalType
of the type.getTemporalType
in interface TypedExpression<E>
public String toString()
toString
in class AbstractCollection<E>
Copyright © 2019 The Holon Platform. All rights reserved.