Uses of Interface
org.apache.juneau.commons.svl.VarFunction
Packages that use VarFunction
Package
Description
Simple Variable Language
Built-in
VarFunction catalog for
#{name(args...)} script-evaluation syntax.-
Uses of VarFunction in org.apache.juneau.commons.svl
Classes in org.apache.juneau.commons.svl that implement VarFunctionModifier and TypeClassDescriptionclassReflection-based base class forVarFunctionimplementations that prefer typed argument signatures over manualList<Object>unpacking.Methods in org.apache.juneau.commons.svl that return types with arguments of type VarFunctionModifier and TypeMethodDescriptionprotected Map<String,VarFunction> VarResolver.getFunctionMap()Returns an unmodifiable map ofVarFunctionsassociated with this context.Methods in org.apache.juneau.commons.svl with parameters of type VarFunctionModifier and TypeMethodDescriptionVarResolver.Builder.functions(VarFunction... values) Register one or moreVarFunctioninstances on this builder. -
Uses of VarFunction in org.apache.juneau.commons.svl.functions
Classes in org.apache.juneau.commons.svl.functions that implement VarFunctionModifier and TypeClassDescriptionstatic class#{abs(a)}— returns the absolute value ofa.static class#{add(a, b)}— returnsa + b.static class#{divide(a, b)}— returnsa / b.static class#{max(a, b)}— returns the larger of two numbers.static class#{min(a, b)}— returns the smaller of two numbers.static class#{modulo(a, b)}— returnsa % b.static class#{multiply(a, b)}— returnsa * b.static class#{subtract(a, b)}— returnsa - b.static class#{and(a, b, ...)}— returns"true"only if all args are true.static class#{eq(a, b)}— string-equality.static class#{gt(a, b)}— numeric greater-than.static class#{gte(a, b)}— numeric greater-than-or-equal.static class#{lt(a, b)}— numeric less-than.static class#{lte(a, b)}— numeric less-than-or-equal.static class#{neq(a, b)}— string-inequality.static class#{not(a)}— returns the boolean negation ofa.static class#{or(a, b, ...)}— returns"true"if any arg is true.static class#{xor(a, b)}— returnsa XOR b.static class#{coalesce(a, b, ...)}— replacement for the legacy$CO{...}.static class#{if(cond, then, else)}— replacement for the legacy$IF{...}.static class#{notEmpty(s)}— replacement for the legacy$NE{...}.static class#{switch(value, case1, val1, case2, val2, ..., default)}— replacement for the legacy$SW{...}.static classstatic class#{now()}— current epoch milliseconds (UTC).static class#{parseDate(s)}/#{parseDate(s, format)}— parses an ISO-8601 string or aDateTimeFormatter-pattern string to epoch milliseconds.static class#{base64Decode(s)}— Base64-decodess(UTF-8 result).static class#{base64Encode(s)}— Base64-encodess(UTF-8).static class#{htmlEscape(s)}— escapes&,<,>,",'(the OWASP minimal HTML-injection-safe set).static class#{htmlUnescape(s)}— inverse ofEncodingFunctions.HtmlEscape.static class#{urlDecode(s)}— URL-form-decodes.static class#{urlEncode(s)}— URL-form-encodes (i.e.static class#{get(json, key)}— extractsjson[key](object) orjson[index](array, whenkeyparses as int).static class#{jsonPath(json, path)}/#{jsonPath(json, path, default)}— extracts a value via a slash-rooted path (e.g.static class#{keys(json)}— returns a JSON-array-shortcut string of an object's keys.static class#{size(json)}— returns the count: object key count, array length, string length, or0for null/primitives.static class#{values(json)}— returns a JSON-array-shortcut string of an object's values (or array elements).static class#{rand()}— random double in[0.0, 1.0).static class#{randChoice(option1, option2, ...)}— variadic.static class#{randInt(max)}— random int in[0, max).static class#{randLong(min, max)}— random long in[min, max](inclusive both ends).static class#{randString(length)}— random alphanumeric[A-Za-z0-9]string oflengthcharacters.static class#{uuid()}— random UUID viaUUID.randomUUID().static class#{extract(s, regex)}/#{extract(s, regex, group)}— replacement for the legacy$PE{...}.static class#{match(s, regex)}— replacement for the legacy$PM{...}.static class#{replaceRegex(s, regex, replacement)}— replacement for the legacy$PR{...}.static class#{concat(s1, s2, ...)}— variadic string concatenation.static class#{contains(s, substr)}— returns"true"or"false".static class#{endsWith(s, suffix)}— returns"true"or"false".static class#{format(pattern, args...)}—Java formatter-style formatting.static class#{join(separator, parts...)}— concatenatespartswithseparatorbetween each pair.static class#{len(s)}/#{len(s, delimiter)}— replacement for the legacy$LN{...}.static class#{lower(s)}— replacement for the legacy$LC{...}.static class#{pathToken(s)}— normalize a user-supplied path token for safe interpolation into apath=template.static class#{repeat(s, n)}— repeatssntimes.static class#{replace(s, target, replacement)}— literal (non-regex) string replacement.static class#{reverse(s)}— reverses the characters ofs.static class#{split(s, separator)}— splitsson the literalseparatorsubstring.static class#{startsWith(s, prefix)}— returns"true"or"false".static class#{stripLeading(s)}— strips leading whitespace.static class#{stripSlashes(s)}— strips leading and trailing/characters.static class#{stripTrailing(s)}— strips trailing whitespace.static class#{substring(s, start)}/#{substring(s, start, end)}— replacement for the legacy$ST{...}SubstringVar.static class#{trim(s)}— strips leading and trailing whitespace.static class#{upper(s)}— replacement for the legacy$UC{...}.static class#{toBool(s)}— coercesstobooleanand renders as a String.static class#{toDouble(s)}— coercesstodoubleand renders as a String.static class#{toInt(s)}— coercesstointand renders as a String.static class#{toLong(s)}— coercesstolongand renders as a String.