org.openjena.atlas.data
Class AbstractDataBag<E>
java.lang.Object
org.openjena.atlas.data.AbstractDataBag<E>
- All Implemented Interfaces:
- Iterable<E>, DataBag<E>, Closeable, Sink<E>
- Direct Known Subclasses:
- DefaultDataBag, SortedDataBag
public abstract class AbstractDataBag<E>
- extends Object
- implements DataBag<E>
Abstract implementation of DataBag. Used as a parent for all three of the types of data bags.
|
Method Summary |
void |
addAll(Iterable<? extends E> c)
Add contents of an Iterable to the bag. |
void |
addAll(Iterator<? extends E> it)
Add contents of an Iterator to the bag. |
boolean |
isEmpty()
|
void |
send(E item)
|
long |
size()
Get the number of elements in the bag, both in memory and on disk. |
| Methods inherited from interface org.openjena.atlas.lib.Sink |
flush |
| Methods inherited from interface org.openjena.atlas.lib.Closeable |
close |
AbstractDataBag
public AbstractDataBag()
isEmpty
public boolean isEmpty()
size
public long size()
- Description copied from interface:
DataBag
- Get the number of elements in the bag, both in memory and on disk.
- Specified by:
size in interface DataBag<E>
- Returns:
- number of elements in the bag
addAll
public void addAll(Iterable<? extends E> c)
- Description copied from interface:
DataBag
- Add contents of an Iterable to the bag.
- Specified by:
addAll in interface DataBag<E>
- Parameters:
c - iterable to add contents of.
addAll
public void addAll(Iterator<? extends E> it)
- Description copied from interface:
DataBag
- Add contents of an Iterator to the bag.
- Specified by:
addAll in interface DataBag<E>
- Parameters:
it - iterator to add contents of.
send
public void send(E item)
- Specified by:
send in interface Sink<E>
Licenced under the Apache License, Version 2.0