edu.nrao.sss.catalog
Class SimpleCatalog<I extends CatalogItem<I>>

java.lang.Object
  extended by edu.nrao.sss.catalog.Catalog<I,SimpleItemGroup<I>,SimpleCatalog<I>>
      extended by edu.nrao.sss.catalog.SimpleCatalog<I>
All Implemented Interfaces:
CatalogItemGroupListener<I,SimpleItemGroup<I>,SimpleCatalog<I>>, Cloneable

public class SimpleCatalog<I extends CatalogItem<I>>
extends Catalog<I,SimpleItemGroup<I>,SimpleCatalog<I>>

A simple catalog of items and groups of items.

The groups of this catalog are of type SimpleItemGroup<I>. Use this class as you would any collections class. E.g.:

   SimpleCatalog<Widget> myCatalog = new SimpleCatalog<Widget>();
   myCatalog.add(widgetA);
   ...
Use this catalog when you have no need for specialized behavior for your catalog or for your item group objects.

CVS Info:

$Revision: 161 $
$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $
$Author: btruitt $

Since:
2006-10-31
Author:
David M. Harland

Constructor Summary
SimpleCatalog()
          Creates a new catalog with a default name.
SimpleCatalog(String nameOfCatalog)
          Creates a new catalog with the given name.
 
Method Summary
 SimpleItemGroup<I> createGroup()
          Returns a group of the same type of items used by this catalog.
protected  SimpleItemGroup<I> createMainGroup()
          Creates and returns a new group to use as the holder of items for this catalog.
 
Methods inherited from class edu.nrao.sss.catalog.Catalog
addGroup, addGroup, addGroups, addGroups, addItem, addItem, addItemEvenIfEqualToCurrentItem, addItemEvenIfEqualToCurrentItem, addItems, addItems, addListener, clear, clearId, clone, contains, containsGroupNamed, decrementIndexOfGroup, decrementIndexOfGroupAt, decrementIndexOfItem, decrementIndexOfItemAt, equals, getGroup, getGroup, getGroups, getGroupsThatContain, getId, getIdOfUnidentified, getInternalGroupList, getInternalItemList, getItem, getItems, getName, getNotes, getReservedGroupName, hashCode, incrementIndexOfGroup, incrementIndexOfGroupAt, incrementIndexOfItem, incrementIndexOfItemAt, indexOf, lastIndexOf, memberAdded, memberMoved, memberRemoved, memberReplaced, membersSorted, moveGroup, moveGroup, moveItem, moveItem, removeAllGroups, removeAllItems, removeAllListeners, removeGroup, removeGroup, removeItem, removeItem, removeListener, setId, setInternalGroupList, setInternalItemList, setName, setReservedGroupName, size, sort, sortGroups, swapGroups, swapItems, tellListenersAboutFormerGroup, tellListenersAboutMovedGroup, tellListenersAboutNewGroup, toGroup, toString, toXml, writeAsXmlTo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleCatalog

public SimpleCatalog()
Creates a new catalog with a default name.


SimpleCatalog

public SimpleCatalog(String nameOfCatalog)
Creates a new catalog with the given name.

Parameters:
nameOfCatalog - the name of this catalog. If this value is null, this catalog will be given a default name.
Method Detail

createMainGroup

protected SimpleItemGroup<I> createMainGroup()
Description copied from class: Catalog
Creates and returns a new group to use as the holder of items for this catalog.

Specified by:
createMainGroup in class Catalog<I extends CatalogItem<I>,SimpleItemGroup<I extends CatalogItem<I>>,SimpleCatalog<I extends CatalogItem<I>>>
Returns:
a new group to use as this catalog's main group.

createGroup

public SimpleItemGroup<I> createGroup()
Description copied from class: Catalog
Returns a group of the same type of items used by this catalog.

Specified by:
createGroup in class Catalog<I extends CatalogItem<I>,SimpleItemGroup<I extends CatalogItem<I>>,SimpleCatalog<I extends CatalogItem<I>>>
Returns:
a group of the same type of items used by this catalog.


Copyright © 2009. All Rights Reserved.