us.bpsm.edn.parser
Interface CollectionBuilder
-
public interface CollectionBuilderThe parser uses each CollectionBuilder to build a set, map, vector or list.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static interfaceCollectionBuilder.FactoryThe parser uses CollectionBuilder.Factory instances to get a fresh CollectionBuilder each time it needs to build a set, map, vector or list.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadd(java.lang.Object o)Add an item to the collection being built.java.lang.Objectbuild()Return the collection containing all the elements previously added.
-
-
-
Method Detail
-
add
void add(java.lang.Object o)
Add an item to the collection being built. In the case of a map, this will be called an even number of times, first for a key and then for its corresponding value until all key-value pairs of the map have been added.add()may not be called afterbuild().
-
build
java.lang.Object build()
Return the collection containing all the elements previously added.build()may only be called once. Afterbuild()has been called, the builder is rendered useless and can be discarded.- Returns:
- The collection. Generally a Set, Map or some kind of List.
-
-
DMelt 3.0 © DataMelt by jWork.ORG