Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 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.

Field Summary
`private static long` | `serialVersionUID` Serialization ID

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`BookSet()`
`BookSet(Collection books)`

Method Summary
`void` | `add(int index, Object element)`
`boolean` | `add(Object book)`
`boolean` | `addAll(Collection c)`
`boolean` | `addAll(int index, Collection c)`
`BookSet` | `filter(Filter filter)`
`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.
`Object` | `set(int index, Object element)`

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)

### add

    public void add(int index,
                    Object element)

  Specified by:
    `add` in interface `List`
  Overrides:
    `add` in class `ArrayList`

### add

    public final 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 final 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 final 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD