Class KeyCaster
java.lang.Object
ortus.boxlang.runtime.dynamic.casters.KeyCaster
- All Implemented Interfaces:
IBoxCaster
I handle casting anything to a Key
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CastAttempt
<Key> Tests to see if the value can be cast to a Key.static Key
Used to cast anything to a Key, throwing exception if we failstatic Key
Used to cast anything to a Key
-
Constructor Details
-
KeyCaster
public KeyCaster()
-
-
Method Details
-
attempt
Tests to see if the value can be cast to a Key. 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 Key- Returns:
- The Key value
-
cast
Used to cast anything to a Key, throwing exception if we fail- Parameters:
object
- The value to cast to a Key- Returns:
- The Key value
-
cast
Used to cast anything to a Key- Parameters:
object
- The value to cast to a Keyfail
- True to throw exception when failing.- Returns:
- The Key value
-