Class Field<V extends @Nullable Object>
Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.
java.lang.Object
dev.gecode.iris.Field<V>
- Type Parameters:
V- the type of the entry's value
- Direct Known Subclasses:
DynField, FloatField, IntField, NumField, StringField
A typed handle: the name of an entry, and the Java type
V that Data.get(Field)
returns for it.
Handles come from dev.gecode.iris.build, whose factories fix the value type and depth,
as int2("machine") gives an IntField<List<long[]>>. A spec builder uses them in
statements and expressions; after reading, data.get(handle) returns the entry as
V. A handle whose entry may be absent has a nullable V, and get returns null for
it.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Field
Creates a handle. Only the handle classes ofdev.gecode.iris.buildextend this class.- Parameters:
name- the name of the entry
-
-
Method Details
-
name
-
readFrom
Reads the entry of this handle fromdata.- Parameters:
data- the data that a read produced- Returns:
- the value of the entry, or null for an absent entry of an optional handle
- Throws:
IllegalStateException- if the entry is missing, or has another type or depth
-