001 package edu.nrao.sss.catalog; 002 003 /** 004 * A simple group of catalog items. This group is used by the 005 * {@link SimpleCatalog} class. 006 * <p> 007 * <b>CVS Info:</b> 008 * <table style="margin-left:2em"> 009 * <tr><td>$Revision: 161 $</td></tr> 010 * <tr><td>$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $</td></tr> 011 * <tr><td>$Author: btruitt $</td></tr> 012 * </table></p> 013 * 014 * @author David M. Harland 015 * @since 2006-10-31 016 */ 017 public class SimpleItemGroup<I extends CatalogItem<I>> 018 extends CatalogItemGroup<I, SimpleItemGroup<I>, SimpleCatalog<I>> 019 { 020 /** 021 * Creates a new group with a default name and that belongs to no catalog. 022 */ 023 public SimpleItemGroup() 024 { 025 super(); 026 } 027 028 /** 029 * Creates a new group that belongs to {@code container}. 030 * 031 * @param container the name of the one catalog to which this group belongs. 032 * This value may be <i>null</i>. 033 * 034 * @param nameOfGroup the name of this group. If this value is <i>null</i>, 035 * a non-null default name will be used. 036 */ 037 public SimpleItemGroup(SimpleCatalog<I> container, String nameOfGroup) 038 { 039 super(container, nameOfGroup); 040 } 041 042 /** 043 * Special constructor used only by SimpleCatalog for constructing its main 044 * group. 045 */ 046 SimpleItemGroup(SimpleCatalog<I> container) 047 { 048 super(container); 049 } 050 051 //============================================================================ 052 // 053 //============================================================================ 054 055 //This is here for quick testing 056 /* 057 public static void main(String[] args) 058 { 059 class Junk implements CatalogItem<Junk> 060 { 061 public Junk clone() { return new Junk(); } 062 } 063 064 SimpleCatalog<Junk> myCat = new SimpleCatalog<Junk>(); 065 SimpleItemGroup<Junk> garageJunk = new SimpleItemGroup<Junk>(myCat, "Garage"); 066 System.out.println(myCat); 067 System.out.println(garageJunk); 068 } 069 */ 070 }