Interface JoiningExpression<T>
-
- Type Parameters:
T- the input entity type
- All Superinterfaces:
Comparator<T>,Expression<T>,Function<T,String>,HasCase<T,ToString<T>>,HasCompare<T>,HasCompose<T>,HasHash<T>,HasMap<T,UnaryOperator<String>,ToString<T>>,ToString<T>
public interface JoiningExpression<T> extends ToString<T>
A special type ofToStringexpression that joins several strings together using optionally a separator, a prefix and a suffix.- Since:
- 3.1.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<ToString<T>>expressions()Returns an unmodifiable list of the expressions that are joined together in this expression.CharSequenceprefix()Returns the prefix to put in front of the result of this expression.CharSequenceseparator()Returns the separator that will be placed in-between the results of all theexpressions()to separate them.CharSequencesuffix()Returns the suffix to put at the end of the result of this expression.-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface com.speedment.runtime.compute.ToString
apply, compare, compose, expressionType, hash, map, toLowerCase, toUpperCase
-
-
-
-
Method Detail
-
expressions
List<ToString<T>> expressions()
Returns an unmodifiable list of the expressions that are joined together in this expression. Whenever an entity is passed to this expression, the result will be the result of passing the same entity to all these expressions and joining them together with an optionalprefix(),separator()andsuffix().- Returns:
- unmodifiable list of expressions that make up this expression
-
prefix
CharSequence prefix()
Returns the prefix to put in front of the result of this expression. If no prefix is used, then this method will return an empty string.- Returns:
- the prefix
-
suffix
CharSequence suffix()
Returns the suffix to put at the end of the result of this expression. If no suffix is used, then this method will return an empty string.- Returns:
- the suffix
-
separator
CharSequence separator()
Returns the separator that will be placed in-between the results of all theexpressions()to separate them. If no separator is used, then this method will return an empty string.- Returns:
- the separator
-
-