Package org.evrete.api
Interface Type<T>
- Type Parameters:
T- Java type
- All Known Implementing Classes:
TypeWrapper
public interface Type<T> extends Named, Copyable<Type<T>>
The definition of a type which is assigned to every object before it gets into the working memory.
-
Method Summary
Modifier and Type Method Description TypeFielddeclareField(String name, Class<?> type, Function<T,Object> function)Field declaration with aFunctionas value reader.default TypeFielddeclareField(String name, Predicate<T> function)default TypeFielddeclareField(String name, ToDoubleFunction<T> function)default TypeFielddeclareField(String name, ToIntFunction<T> function)default TypeFielddeclareField(String name, ToLongFunction<T> function)Collection<TypeField>getDeclaredFields()TypeFieldgetField(String name)Returns a declared field with the given name, or null if no such field is found or resolvedClass<T>getJavaType()
-
Method Details
-
getJavaType
-
getDeclaredFields
Collection<TypeField> getDeclaredFields() -
getField
Returns a declared field with the given name, or null if no such field is found or resolved
- Parameters:
name- field name- Returns:
- a declared field or null
-
declareField
Field declaration with a
Functionas value reader.- Parameters:
name- field nametype- field value typefunction- the function that will be used to read field's value- Returns:
- newly created field
-
declareField
-
declareField
-
declareField
-
declareField
-