Class StringToken
- java.lang.Object
-
- io.cui.tools.formatting.template.token.StringToken
-
- All Implemented Interfaces:
Token,Serializable
public class StringToken extends Object implements Token
Simple String token, this token returns always his value on substituteAttribute(FormatterSupport)- Author:
- Eugen Fischer
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringToken(@NonNull String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)inthashCode()booleanisStringToken()StringsubstituteAttribute(FormatterSupport content)returns always stored string valueStringtoString()
-
-
-
Constructor Detail
-
StringToken
public StringToken(@NonNull @NonNull String value)
-
-
Method Detail
-
substituteAttribute
public String substituteAttribute(FormatterSupport content)
returns always stored string value- Specified by:
substituteAttributein interfaceToken- Parameters:
content- must not be null- Returns:
- token specific template with substituted attribute value if attribute exists,
emptyString otherwise
-
isStringToken
public boolean isStringToken()
- Specified by:
isStringTokenin interfaceToken- Returns:
- true if Token has no substitutions
-
-