Package io.quarkus.qute
Class ValueResolvers
- java.lang.Object
-
- io.quarkus.qute.ValueResolvers
-
public final class ValueResolvers extends Object
Common value resolvers.
-
-
Constructor Summary
Constructors Constructor Description ValueResolvers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ValueResolverarrayResolver()static ValueResolvercollectionResolver()static ValueResolverlistResolver()static ValueResolverlogicalAndResolver()Performs conditional AND on the base object and the first parameter.static ValueResolverlogicalOrResolver()Performs conditional OR on the base object and the first parameter.static ValueResolvermapEntryResolver()static ValueResolvermapperResolver()static ValueResolvermapResolver()static ValueResolverminusResolver()static ValueResolvermodResolver()static ValueResolvernumberValueResolver()static ValueResolverorEmpty()Return an empty list if the base object is null or not found.static ValueResolverorResolver()Returns the default value if the base object isnull, emptyOptionalor not found and the base object otherwise.static ValueResolverplusResolver()static ValueResolverrawResolver()static ValueResolverthisResolver()static ValueResolvertrueResolver()ReturnsResults#NotFoundif the base object is falsy and the base object otherwise.
-
-
-
Field Detail
-
OR
public static final String OR
- See Also:
- Constant Field Values
-
-
Method Detail
-
rawResolver
public static ValueResolver rawResolver()
-
listResolver
public static ValueResolver listResolver()
-
collectionResolver
public static ValueResolver collectionResolver()
-
thisResolver
public static ValueResolver thisResolver()
-
orResolver
public static ValueResolver orResolver()
Returns the default value if the base object isnull, emptyOptionalor not found and the base object otherwise.foo.or(bar),foo or true,name ?: 'elvis'
-
orEmpty
public static ValueResolver orEmpty()
Return an empty list if the base object is null or not found.
-
trueResolver
public static ValueResolver trueResolver()
ReturnsResults#NotFoundif the base object is falsy and the base object otherwise.Can be used together with
orResolver()to form a ternary operator.person.isElvis ? 'elvis' : notElvis
-
mapEntryResolver
public static ValueResolver mapEntryResolver()
-
mapResolver
public static ValueResolver mapResolver()
-
mapperResolver
public static ValueResolver mapperResolver()
-
logicalAndResolver
public static ValueResolver logicalAndResolver()
Performs conditional AND on the base object and the first parameter. It's a short-circuiting operation - the parameter is only evaluated if needed.- See Also:
Booleans.isFalsy(Object)
-
logicalOrResolver
public static ValueResolver logicalOrResolver()
Performs conditional OR on the base object and the first parameter. It's a short-circuiting operation - the parameter is only evaluated if needed.- See Also:
Booleans.isFalsy(Object)
-
arrayResolver
public static ValueResolver arrayResolver()
-
numberValueResolver
public static ValueResolver numberValueResolver()
-
plusResolver
public static ValueResolver plusResolver()
-
minusResolver
public static ValueResolver minusResolver()
-
modResolver
public static ValueResolver modResolver()
-
-