Package net.hydromatic.morel.type
Interface TypedValue
- All Known Subinterfaces:
File
- All Known Implementing Classes:
Files.AbstractFile,Files.DataFile,Files.Directory,Files.UnknownChildFile,Files.UnknownFile
public interface TypedValue
A value that knows its own type.
-
Method Summary
Modifier and TypeMethodDescriptiondefault TypedValuediscoverField(TypeSystem typeSystem, String fieldName) Tries to expand the type to include the given field name.default <V> VfieldValueAs(int fieldIndex, Class<V> clazz) Returns the value of a field, identified by ordinal, cast as a particular type.default <V> VfieldValueAs(String fieldName, Class<V> clazz) Returns the value of a field, identified by name, cast as a particular type.typeKey()Key from which the type of this value can be constructed.<V> VReturns the value cast as a particular type.
-
Method Details
-
valueAs
Returns the value cast as a particular type. -
fieldValueAs
Returns the value of a field, identified by name, cast as a particular type. -
fieldValueAs
Returns the value of a field, identified by ordinal, cast as a particular type. -
typeKey
Type.Key typeKey()Key from which the type of this value can be constructed. -
discoverField
Tries to expand the type to include the given field name.Returns this value or an expanded value.
-