org.crosswire.jsword.book
Class BookSet

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by org.crosswire.common.util.SortedListSet
                  extended by org.crosswire.jsword.book.BookSet
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, Set

public class BookSet
extends SortedListSet

BookSet represents a collection of descriptions about Books which may be subsetted into other BookMetaDataSets. Each set is naturally ordered.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: BookSet.java,v 1.1 2005/03/19 01:56:47 dmsmith Exp $
Author:
DM Smith [dmsmith555 at yahoo dot com]
See Also:
Licence, Serialized Form

Nested Class Summary
private static class BookSet.GroupFilter
          GroupFilter does the SQL traditional group by.
 
Field Summary
private static long serialVersionUID
          Serialization ID
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
BookSet()
           
BookSet(Collection books)
           
 
Method Summary
 BookSet filter(String key, String value)
           
 Set getGroup(String key)
          Get the sorted set of all values for a particular key.
 Set getGroups()
          Gets the sorted set of all keys which can be used for groupings.
 
Methods inherited from class org.crosswire.common.util.SortedListSet
add, add, addAll, addAll, filter, set
 
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 class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values
Constructor Detail

BookSet

public BookSet()

BookSet

public BookSet(Collection books)
Method Detail

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)

Copyright ? 2003-2004