org.deri.iris.builtins.datatype
Class ToTimeBuiltin
java.lang.Object
org.deri.iris.builtins.AbstractBuiltin
org.deri.iris.builtins.FunctionalBuiltin
org.deri.iris.builtins.datatype.ConversionBuiltin
org.deri.iris.builtins.datatype.ToTimeBuiltin
- All Implemented Interfaces:
- Comparable<IAtom>, IAtom, IBuiltinAtom
public class ToTimeBuiltin
- extends ConversionBuiltin
Represents a data type conversion function, which converts supported data
type instances to Time instances. The following data types are supported:
|
Method Summary |
protected ITerm |
convert(ITerm term)
Converts the given supported data type instance to the specific data type |
static ITime |
toTime(IDateTime term)
Converts a DateTime term to a Time term. |
ToTimeBuiltin
public ToTimeBuiltin(ITerm... terms)
- Creates a new instance of this builtin.
- Parameters:
terms - The term representing the data type instance to be
converted.
convert
protected ITerm convert(ITerm term)
- Description copied from class:
ConversionBuiltin
- Converts the given supported data type instance to the specific data type
- Specified by:
convert in class ConversionBuiltin
- Returns:
- The result of the conversion or
null if the
specified data type is not compatible.
toTime
public static ITime toTime(IDateTime term)
- Converts a DateTime term to a Time term.
- Parameters:
term - The DateTime term to be converted.
- Returns:
- A new Time term representing the result of the conversion.