Class StringCaster
java.lang.Object
ortus.boxlang.runtime.dynamic.casters.StringCaster
- All Implemented Interfaces:
IBoxCaster
I handle casting anything to a string
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CastAttempt
<String> Tests to see if the value can be cast to a string.static CastAttempt
<String> Tests to see if the value can be cast to a string.static String
Used to cast anything to a string, throwing exception if we failstatic String
Used to cast anything to a stringstatic String
Used to cast anything to a string, throwing exception if we failstatic String
Used to cast anything to a string
-
Constructor Details
-
StringCaster
public StringCaster()
-
-
Method Details
-
attempt
Tests to see if the value can be cast to a string. Returns aCastAttempt<T>
which will contain the result if casting was was successfull, or can be interogated to proceed otherwise.- Parameters:
object
- The value to cast to a string- Returns:
- The string value
-
attempt
Tests to see if the value can be cast to a string. Returns aCastAttempt<T>
which will contain the result if casting was was successfull, or can be interogated to proceed otherwise.- Parameters:
object
- The value to cast to a string- Returns:
- The string value
-
cast
Used to cast anything to a string, throwing exception if we fail- Parameters:
object
- The value to cast to a string- Returns:
- The string value
-
cast
Used to cast anything to a string, throwing exception if we fail- Parameters:
object
- The value to cast to a string- Returns:
- The string value
-
cast
Used to cast anything to a string- Parameters:
object
- The value to cast to a stringfail
- True to throw exception when failing.- Returns:
- The String value
-
cast
Used to cast anything to a string- Parameters:
object
- The value to cast to a stringfail
- True to throw exception when failing.- Returns:
- The String value
-