Class Substring
- java.lang.Object
- 
- software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
- 
- software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
- 
- software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunction
- 
- software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Substring
 
 
 
 
- 
- All Implemented Interfaces:
- FromSourceLocation,- ToNode,- TypeCheck,- ToCondition,- ToExpression
 
 public final class Substring extends LibraryFunction A rule-set function for getting the substring of a string value.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSubstring.DefinitionAFunctionDefinitionfor theSubstringfunction.
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringID- 
Fields inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunctiondefinition, functionNode
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Taccept(ExpressionVisitor<T> visitor)Invoke theExpressionVisitorfunctions for this expression.static Substring.DefinitiongetDefinition()Gets theFunctionDefinitionimplementation.static SubstringofExpressions(ToExpression expression, int startIndex, int stopIndex, boolean reverse)Creates aSubstringfunction from the given expressions.static SubstringofExpressions(ToExpression expression, ToExpression startIndex, ToExpression stopIndex, ToExpression reverse)Creates aSubstringfunction from the given expressions.- 
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.functions.LibraryFunctionequals, expectOneArgument, getArguments, getName, getSourceLocation, hashCode, toNode, toString, typeCheckLocal
 - 
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.ExpressionfromNode, getLiteral, getReference, of, of, of, parseShortform, toConditionBuilder, toExpression, type, typeCheck
 - 
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.SyntaxElementbooleanEqual, getAttr, getAttr, isSet, isValidHostLabel, not, parseUrl, stringEqual, substring, template
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface software.amazon.smithy.rulesengine.language.syntax.ToConditiontoCondition, toCondition
 
- 
 
- 
- 
- 
Field Detail- 
IDpublic static final java.lang.String ID - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getDefinitionpublic static Substring.Definition getDefinition() Gets theFunctionDefinitionimplementation.- Returns:
- the function definition.
 
 - 
ofExpressionspublic static Substring ofExpressions(ToExpression expression, ToExpression startIndex, ToExpression stopIndex, ToExpression reverse) Creates aSubstringfunction from the given expressions.- Parameters:
- expression- the string to extract from.
- startIndex- the starting index.
- stopIndex- the ending index.
- reverse- the reverse order argument.
- Returns:
- The resulting Substringfunction.
 
 - 
ofExpressionspublic static Substring ofExpressions(ToExpression expression, int startIndex, int stopIndex, boolean reverse) Creates aSubstringfunction from the given expressions.- Parameters:
- expression- the string to extract from.
- startIndex- the starting index.
- stopIndex- the ending index.
- reverse- the reverse order argument.
- Returns:
- The resulting Substringfunction.
 
 - 
acceptpublic <T> T accept(ExpressionVisitor<T> visitor) Description copied from class:ExpressionInvoke theExpressionVisitorfunctions for this expression.- Specified by:
- acceptin class- Expression
- Type Parameters:
- T- the visitor return type.
- Parameters:
- visitor- the visitor to be invoked.
- Returns:
- the return value of the visitor.
 
 
- 
 
-