Package io.permazen.core
Class ListField<E>
java.lang.Object
- Type Parameters:
E- Java type for the list elements
List field.
Permazen list fields have performance characteristics similar to ArrayList.
-
Field Summary
Fields inherited from class io.permazen.core.CollectionField
ELEMENT_FIELD_NAME -
Method Summary
Modifier and TypeMethodDescriptionGet the index on this fields's "element" sub-field.Get the key in the underlying key/value store corresponding to this field in the specified object and the specified list index.getValue(Transaction tx, ObjId id) Get the value of this field in the given object.toString()<R> Rvisit(FieldSwitch<R> target) Apply visitor pattern.Methods inherited from class io.permazen.core.CollectionField
getElementField, getSubFields, hasDefaultValueMethods inherited from class io.permazen.core.Field
getFullName, getKey, getObjType, getTypeTokenMethods inherited from class io.permazen.core.SchemaItem
getName, getSchema, getSchemaId, getStorageId
-
Method Details
-
getElementIndex
Description copied from class:CollectionFieldGet the index on this fields's "element" sub-field.- Overrides:
getElementIndexin classCollectionField<List<E>,E> - Returns:
- the index on this field's "element" sub-field
-
getValue
Description copied from class:FieldGet the value of this field in the given object. Does not alter the schema of the object.- Specified by:
getValuein classCollectionField<List<E>,E> - Parameters:
tx- transactionid- object id- Returns:
- this field's value in the specified object
-
getKey
Get the key in the underlying key/value store corresponding to this field in the specified object and the specified list index.- Parameters:
id- object IDindex- list index- Returns:
- the corresponding
KVDatabasekey - Throws:
IllegalArgumentException- ifidis null or has the wrong object typeIllegalArgumentException- ifindexis negative- See Also:
-
visit
Description copied from class:FieldApply visitor pattern. -
toString
- Specified by:
toStringin classSchemaItem
-