public interface CellCollection extends java.util.Collection<Cell<?>>
Cell
s.
The iteration order is not defined for a CellCollection
but may be specified
by an API method returning an instance.Modifier and Type | Method and Description |
---|---|
default <T> java.util.Optional<T> |
get(CellDefinition<T> cellDefinition)
Retrieve a cell by
CellDefinition . |
default java.util.Optional<?> |
get(java.lang.String name)
Retrieve a cell by name.
|
default <T> java.util.Optional<T> get(CellDefinition<T> cellDefinition)
CellDefinition
. If this record contains a cell whose definition matches
the supplied definition (in both name and type) then that cell's value is
wrapped in an Optional
and returned. If this record contains no
matching cell then an empty Optional
is returned.T
- the cell JDK typecellDefinition
- cell to retrieveOptional
with the cell value or an empty Optional
if the record contains no matching celljava.lang.NullPointerException
- if cellDefinition
is null
default java.util.Optional<?> get(java.lang.String name)
Optional
and returned. If this record contains no
matching cell then an empty Optional
is returned.name
- cell to retrieveOptional
with the cell value or an empty Optional
if the record contains no matching celljava.lang.NullPointerException
- if name
is null