org.crosswire.jsword.book
Class BookSet
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.crosswire.jsword.book.BookSet
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable, Collection, List, RandomAccess, Set
public class BookSet
- extends ArrayList
- implements List, Set
BookSet represents a collection of descriptions about Books
which may be subsetted into other BookMetaDataSets.
Each set is naturally ordered.
- Author:
- DM Smith [dmsmith555 at yahoo dot com]
- See Also:
for license details.
The copyright to this program is held by it's authors.
,
Serialized Form
Nested Class Summary |
private static class |
BookSet.GroupFilter
GroupFilter does the SQL traditional group by. |
Methods inherited from class java.util.ArrayList |
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, size, toArray, toArray, trimToSize |
Methods inherited from interface java.util.List |
clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, size, subList, toArray, toArray |
Methods inherited from interface java.util.Set |
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
serialVersionUID
private static final long serialVersionUID
- Serialization ID
- See Also:
- Constant Field Values
BookSet
public BookSet()
BookSet
public BookSet(Collection books)
getGroups
public Set getGroups()
- Gets the sorted set of all keys which can be used for groupings.
These are all the property keys across the BookMetaDatas in this list.
- Returns:
- the set of all keys which can be used for grouping.
getGroup
public Set getGroup(String key)
- Get the sorted set of all values for a particular key.
If there is a BookMetaData that does not have a value
for that key, then null will be in the set. This can be use
to categorize books that don't have that key.
For example, "Language" will return all the languages
for this BookMetaDataList and null for which the language
is unknown.
- Parameters:
key
-
- Returns:
- the values for a particular key.
filter
public BookSet filter(String key,
String value)
add
public void add(int index,
Object element)
- Specified by:
add
in interface List
- Overrides:
add
in class ArrayList
add
public boolean add(Object book)
- Specified by:
add
in interface Collection
- Specified by:
add
in interface List
- Specified by:
add
in interface Set
- Overrides:
add
in class ArrayList
addAll
public boolean addAll(Collection c)
- Specified by:
addAll
in interface Collection
- Specified by:
addAll
in interface List
- Specified by:
addAll
in interface Set
- Overrides:
addAll
in class ArrayList
addAll
public boolean addAll(int index,
Collection c)
- Specified by:
addAll
in interface List
- Overrides:
addAll
in class ArrayList
set
public Object set(int index,
Object element)
- Specified by:
set
in interface List
- Overrides:
set
in class ArrayList
filter
public BookSet filter(Filter filter)