public interface CollectionBuilder
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CollectionBuilder.Factory
The parser uses CollectionBuilder.Factory instances to get a
fresh CollectionBuilder each time it needs to build a set, map,
vector or list.
|
void add(Object o)
For other collections is can be called any number of times.
Implementations which construct Maps or Sets an should throw an EdnSyntaxException if they detect a duplicate key (in the case of a map) or a duplicate element (in the case of a set).
add() may not be called after build().
o - an object to add to the collection under construction. o may
be null.Object build()
build() may only be called once. After build() has been called, the builder is rendered useless and
can be discarded.Copyright © 2019. All rights reserved.