[jsword-svn] r1036 - in trunk/jsword: .settings src/main/java/org/crosswire/jsword/book src/main/java/org/crosswire/jsword/book/basic src/main/java/org/crosswire/jsword/book/filter src/main/java/org/crosswire/jsword/book/filter/gbf src/main/java/org/crosswire/jsword/book/install src/main/java/org/crosswire/jsword/book/readings src/main/java/org/crosswire/jsword/book/sword src/main/java/org/crosswire/jsword/index/lucene src/main/java/org/crosswire/jsword/passage src/main/java/org/crosswire/jsword/util

dmsmith at crosswire.org dmsmith at crosswire.org
Sun Mar 5 05:39:31 MST 2006


Author: dmsmith
Date: 2006-03-05 05:38:55 -0700 (Sun, 05 Mar 2006)
New Revision: 1036

Modified:
   trunk/jsword/.settings/org.eclipse.jdt.core.prefs
   trunk/jsword/src/main/java/org/crosswire/jsword/book/BookMetaData.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/BookSet.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/SentenceUtil.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBookMetaData.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/DefaultBookMetaData.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/FilterFactory.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFFilter.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTags.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/Tag.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/install/InstallManager.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/ReadingsBook.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntry.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordDictionary.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndexManager.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/BibleInfo.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultKeyList.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/DistinctPassage.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/RangedPassage.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/ReadOnlyPassage.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/SetKeyList.java
   trunk/jsword/src/main/java/org/crosswire/jsword/util/ConverterFactory.java
Log:
Updated to Java 5

Modified: trunk/jsword/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jsword/.settings/org.eclipse.jdt.core.prefs	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/.settings/org.eclipse.jdt.core.prefs	2006-03-05 12:38:55 UTC (rev 1036)
@@ -1,4 +1,4 @@
-#Thu Mar 02 07:15:34 EST 2006
+#Fri Mar 03 18:41:50 EST 2006
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -56,7 +56,7 @@
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookMetaData.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookMetaData.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookMetaData.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -156,7 +156,7 @@
      * The returned Properties will be read-only so any attempts to alter it
      * will fail.
      */
-    Map getProperties();
+    Map<String, String> getProperties();
 
     /**
      * Has anyone generated a search index for this Book?

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookSet.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookSet.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookSet.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -38,7 +38,7 @@
  *      The copyright to this program is held by it's authors.
  * @author DM Smith [dmsmith555 at yahoo dot com]
  */
-public class BookSet extends SortedListSet
+public class BookSet<E extends Comparable<E>> extends SortedListSet<E>
 {
 
     public BookSet()
@@ -46,7 +46,7 @@
         super();
     }
 
-    public BookSet(Collection books)
+    public BookSet(Collection<? extends E> books)
     {
         super(books);
     }
@@ -56,9 +56,9 @@
      * These are all the property keys across the BookMetaDatas in this list.
      * @return the set of all keys which can be used for grouping.
      */
-    public Set getGroups()
+    public Set<String> getGroups()
     {
-        Set results = new TreeSet();
+        Set<String> results = new TreeSet<String>();
         Iterator bookIter = iterator();
         while (bookIter.hasNext())
         {
@@ -79,9 +79,9 @@
      * @param key
      * @return the values for a particular key.
      */
-    public Set getGroup(String key)
+    public Set<String> getGroup(String key)
     {
-        Set results = new TreeSet();
+        Set<String> results = new TreeSet<String>();
         Iterator bookIter = iterator();
         while (bookIter.hasNext())
         {
@@ -93,7 +93,7 @@
         return results;
     }
 
-    public BookSet filter(String key, String value)
+    public BookSet<E> filter(String key, String value)
     {
         return (BookSet) filter(new GroupFilter(key, value));
     }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/OSISUtil.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -33,6 +33,7 @@
 import org.crosswire.jsword.passage.NoSuchVerseException;
 import org.crosswire.jsword.passage.Verse;
 import org.crosswire.jsword.passage.VerseFactory;
+import org.jdom.Content;
 import org.jdom.Element;
 import org.jdom.Parent;
 import org.jdom.Text;
@@ -182,7 +183,7 @@
      */
     private static final String OSISID_PREFIX_BIBLE = "Bible."; //$NON-NLS-1$
 
-    private static final Set EXTRA_BIBLICAL_ELEMENTS = new HashSet(Arrays.asList(new String[]
+    private static final Set<String> EXTRA_BIBLICAL_ELEMENTS = new HashSet<String>(Arrays.asList(new String[]
     {
         OSIS_ELEMENT_NOTE,
     }));
@@ -504,7 +505,7 @@
         StringBuffer buffer = new StringBuffer();
 
         Element osisText = root.getChild(OSISUtil.OSIS_ELEMENT_OSISTEXT);
-        List divs = osisText.getChildren(OSISUtil.OSIS_ELEMENT_DIV);
+        List<Element> divs = osisText.getChildren(OSISUtil.OSIS_ELEMENT_DIV);
 
         for (Iterator oit = divs.iterator(); oit.hasNext(); )
         {
@@ -567,7 +568,7 @@
     {
         StringBuffer buffer = new StringBuffer();
 
-        List content = ele.getContent();
+        List<Content> content = ele.getContent();
         for (Iterator it = content.iterator(); it.hasNext(); )
         {
             Object next = it.next();
@@ -583,7 +584,7 @@
      */
     public static Collection getDeepContent(Element div, String name)
     {
-        List reply = new ArrayList();
+        List<Content> reply = new ArrayList<Content>();
         recurseDeepContent(div, name, reply);
         return reply;
     }
@@ -647,7 +648,7 @@
      * Find all the instances of elements of type <code>find</code> under
      * the element <code>div</code>. For internal use only.
      */
-    private static void recurseDeepContent(Element start, String name, List reply)
+    private static void recurseDeepContent(Element start, String name, List<Content> reply)
     {
         if (start.getName().equals(name))
         {

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/SentenceUtil.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/SentenceUtil.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/SentenceUtil.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -56,7 +56,7 @@
      */
     public static String[] tokenize(String sentence)
     {
-        List tokens = new ArrayList();
+        List<String> tokens = new ArrayList<String>();
 
         int pos = 0;
         String temp;

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBook.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -191,7 +191,7 @@
     /* (non-Javadoc)
      * @see org.crosswire.jsword.book.BookMetaData#getProperties()
      */
-    public Map getProperties()
+    public Map<String, String> getProperties()
     {
         return bmd.getProperties();
     }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBookMetaData.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBookMetaData.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/AbstractBookMetaData.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -149,7 +149,7 @@
     /* (non-Javadoc)
      * @see org.crosswire.jsword.book.BookMetaData#getProperties()
      */
-    public Map getProperties()
+    public Map<String, String> getProperties()
     {
         return prop;
     }
@@ -157,7 +157,7 @@
     /**
      * @param newProperties
      */
-    public void setProperties(Map newProperties)
+    public void setProperties(Map<String, String> newProperties)
     {
         prop = newProperties;
     }
@@ -175,7 +175,7 @@
      * @param key
      * @param value
      */
-    protected void putProperty(String key, Object value)
+    protected void putProperty(String key, String value)
     {
         prop.put(key, value);
     }
@@ -195,7 +195,7 @@
     {
         IndexStatus oldValue = this.indexStatus;
         this.indexStatus = newValue;
-        prop.put(KEY_INDEXSTATUS, newValue);
+        prop.put(KEY_INDEXSTATUS, newValue.name());
         firePropertyChange(oldValue, newValue);
     }
 
@@ -409,7 +409,7 @@
     /**
      * The single key version of the properties
      */
-    private Map prop = new LinkedHashMap();
+    private Map<String, String> prop = new LinkedHashMap<String, String>();
 
     private BookDriver driver;
     private String fullName;

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/DefaultBookMetaData.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/DefaultBookMetaData.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/basic/DefaultBookMetaData.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -21,7 +21,7 @@
  */
 package org.crosswire.jsword.book.basic;
 
-import java.util.Properties;
+import java.util.Map;
 
 import org.crosswire.common.util.StringUtil;
 import org.crosswire.common.xml.XMLUtil;
@@ -53,14 +53,14 @@
      * Ctor with a properties from which to get values.
      * A call to setBook() is still required after this ctor is called
      */
-    public DefaultBookMetaData(BookDriver driver, Book book, Properties prop)
+    public DefaultBookMetaData(BookDriver driver, Book book, Map<String, String> prop)
     {
         setDriver(driver);
 
         setProperties(prop);
-        setName(prop.getProperty(BookMetaData.KEY_NAME));
-        setType(prop.getProperty(BookMetaData.KEY_CATEGORY));
-        setLanguage(prop.getProperty(BookMetaData.KEY_LANGUAGE));
+        setName(prop.get(BookMetaData.KEY_NAME));
+        setType(prop.get(BookMetaData.KEY_CATEGORY));
+        setLanguage(prop.get(BookMetaData.KEY_LANGUAGE));
 
         IndexManager imanager = IndexManagerFactory.getIndexManager();
         if (imanager.isIndexed(book))

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/FilterFactory.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/FilterFactory.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/FilterFactory.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -52,7 +52,7 @@
     /**
      * The lookup table of filters
      */
-    private static Map filters = new HashMap();
+    private static Map<String, Filter> filters = new HashMap<String, Filter>();
 
     /**
      * The lookup table of filters
@@ -65,12 +65,12 @@
      */
     static
     {
-        Map map = ClassUtil.getImplementorsMap(Filter.class);
+        Map<String, Class> map = ClassUtil.getImplementorsMap(Filter.class);
 
         // the default value
         try
         {
-            Class cdeft = (Class) map.remove("default"); //$NON-NLS-1$
+            Class cdeft = map.remove("default"); //$NON-NLS-1$
             deft = (Filter) cdeft.newInstance();
         }
         catch (Exception ex)
@@ -79,14 +79,13 @@
         }
 
         // the lookup table
-        for (Iterator it = map.entrySet().iterator(); it.hasNext(); )
+        for (Map.Entry<String, Class> entry : map.entrySet())
         {
             try
             {
-                Map.Entry entry = (Map.Entry) it.next();
-                Class clazz = (Class) entry.getValue();
+                Class clazz = entry.getValue();
                 Filter instance = (Filter) clazz.newInstance();
-                addFilter((String) entry.getKey(), instance);
+                addFilter(entry.getKey(), instance);
             }
             catch (Exception ex)
             {
@@ -97,7 +96,7 @@
         // if the default didn't work then make a stab at an answer
         if (deft == null)
         {
-            deft = (Filter) filters.values().iterator().next();
+            deft = filters.values().iterator().next();
         }
     }
 
@@ -113,7 +112,7 @@
             String key = (String) it.next();
             if (key.equalsIgnoreCase(lookup))
             {
-                reply = (Filter) filters.get(key);
+                reply = filters.get(key);
                 break;
             }
         }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFFilter.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFFilter.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFFilter.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -30,6 +30,7 @@
 import org.crosswire.jsword.book.filter.Filter;
 import org.crosswire.jsword.book.filter.FilterException;
 import org.crosswire.jsword.passage.Key;
+import org.jdom.Content;
 import org.jdom.Element;
 
 /**
@@ -51,7 +52,7 @@
     {
         DataPolice.setKey(key);
         Element ele = OSISUtil.factory().createDiv();
-        LinkedList stack = new LinkedList();
+        LinkedList<Content> stack = new LinkedList<Content>();
         stack.addFirst(ele);
 
         List taglist = parseTags(plain.trim());
@@ -78,7 +79,7 @@
     private List parseTags(String aRemains)
     {
         String remains = aRemains;
-        List taglist = new ArrayList();
+        List<Tag> taglist = new ArrayList<Tag>();
 
         while (true)
         {

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -82,11 +82,11 @@
             TagBuilder builder = null;
             if (length == 2)
             {
-                builder = (TagBuilder) BUILDERS.get(name);
+                builder = BUILDERS.get(name);
             }
             else
             {
-                builder = (TagBuilder) BUILDERS.get(name.substring(0, 2));
+                builder = BUILDERS.get(name.substring(0, 2));
             }
 
             Tag reply = null;
@@ -406,7 +406,7 @@
     /**
      * The <code>BUILDERS</code> maps the 2 letter GBF tag to a class that proxies for the tag.
      */
-    private static final Map BUILDERS = new HashMap();
+    private static final Map<String, TagBuilder> BUILDERS = new HashMap<String, TagBuilder>();
     static
     {
         TagBuilder defaultEndTagBuilder = new DefaultEndTagBuilder();

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTags.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTags.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTags.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -83,7 +83,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element hi = OSIS_FACTORY.createHI();
             hi.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.HI_BOLD);
@@ -107,7 +107,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element seg = OSIS_FACTORY.createReference();
 
@@ -144,7 +144,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
 
             if (stack.size() == 0)
@@ -178,7 +178,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element current = (Element) stack.get(0);
             Element note = OSIS_FACTORY.createNote();
@@ -241,7 +241,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element title = OSIS_FACTORY.createTitle();
 
@@ -288,7 +288,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element hi = OSIS_FACTORY.createHI();
             hi.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.HI_ITALIC);
@@ -315,7 +315,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             // LATER(joe): is div the right thing?
             Element seg = OSIS_FACTORY.createSeg();
@@ -364,7 +364,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element q = OSIS_FACTORY.createQ();
 
@@ -390,7 +390,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
 
             if (stack.size() == 0)
@@ -423,7 +423,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             // LATER(joe): is speech the right thing?
             Element speech = OSIS_FACTORY.createLG();
@@ -450,7 +450,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element title = OSIS_FACTORY.createTitle();
 
@@ -476,7 +476,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element speaker = OSIS_FACTORY.createSpeaker();
             speaker.setAttribute(OSISUtil.ATTRIBUTE_SPEAKER_WHO, Msg.NAME_JESUS.toString());
@@ -624,7 +624,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element note = OSIS_FACTORY.createNote();
             note.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.NOTETYPE_STUDY);
@@ -651,11 +651,11 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             if (stack.size() == 0)
             {
-                stack.addFirst(getName());
+                stack.addFirst(new Text(getName()));
             }
             else
             {
@@ -681,7 +681,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element title = OSIS_FACTORY.createTitle();
 
@@ -707,7 +707,7 @@
         /* (non-Javadoc)
          * @see org.crosswire.jsword.book.filter.gbf.Tag#updateOsisStack(java.util.LinkedList)
          */
-        public void updateOsisStack(LinkedList stack)
+        public void updateOsisStack(LinkedList<Content> stack)
         {
             Element hi = OSIS_FACTORY.createHI();
             hi.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.HI_UNDERLINE);

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/Tag.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/Tag.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/Tag.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -23,6 +23,8 @@
 
 import java.util.LinkedList;
 
+import org.jdom.Content;
+
 /**
  * GBF Tag interface.
  * 
@@ -35,5 +37,5 @@
     /**
      * Sub-classes should implement this method to generate OSIS Object
      */
-    void updateOsisStack(LinkedList osisStack);
+    void updateOsisStack(LinkedList<Content> osisStack);
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/install/InstallManager.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/install/InstallManager.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/install/InstallManager.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -54,7 +54,7 @@
      */
     public InstallManager()
     {
-        installers = new HashMap();
+        installers = new HashMap<String, Installer>();
 
         try
         {
@@ -73,7 +73,7 @@
                     String name = parts[1];
                     String rest = parts[2];
 
-                    Class clazz = (Class) factories.get(type);
+                    Class clazz = factories.get(type);
                     if (clazz == null)
                     {
                         log.warn(""); //$NON-NLS-1$
@@ -107,10 +107,10 @@
         Properties props = new Properties();
         StringBuffer buf = new StringBuffer();
         int i = 1;
-        for (Iterator it = installers.keySet().iterator(); it.hasNext(); )
+        for (Map.Entry<String, Installer> entry : installers.entrySet())
         {
-            String name = (String) it.next();
-            Installer installer = (Installer) installers.get(name);
+            String name = entry.getKey();
+            Installer installer = entry.getValue();
             // Clear the buffer
             buf.delete(0, buf.length());
             buf.append(installer.getType());
@@ -135,7 +135,7 @@
     /**
      * The names of all the known InstallerFactories
      */
-    public Set getInstallerFactoryNames()
+    public Set<String> getInstallerFactoryNames()
     {
         return Collections.unmodifiableSet(factories.keySet());
     }
@@ -150,10 +150,10 @@
     {
         Class match = installer.getClass();
 
-        for (Iterator it = factories.keySet().iterator(); it.hasNext(); )
+        for (Map.Entry<String, Class> entry : factories.entrySet())
         {
-            String name = (String) it.next();
-            Class factclazz = (Class) factories.get(name);
+            String name = entry.getKey();
+            Class factclazz = entry.getValue();
             try
             {
                 InstallerFactory ifactory = (InstallerFactory) factclazz.newInstance();
@@ -180,10 +180,10 @@
      */
     public String getInstallerNameForInstaller(Installer installer)
     {
-        for (Iterator it = installers.keySet().iterator(); it.hasNext(); )
+        for (Map.Entry<String, Installer> entry : installers.entrySet())
         {
-            String name = (String) it.next();
-            Installer test = (Installer) installers.get(name);
+            String name = entry.getKey();
+            Installer test = entry.getValue();
             if (installer.equals(test))
             {
                 return name;
@@ -191,10 +191,8 @@
         }
 
         log.warn("Failed to find installer name for " + installer.toString() + " among the " + installers.size() + " installers."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-        for (Iterator it = installers.keySet().iterator(); it.hasNext(); )
+        for (Installer test : installers.values())
         {
-            String name = (String) it.next();
-            Installer test = (Installer) installers.get(name);
             log.warn("  it isn't equal to " + test.getInstallerDefinition()); //$NON-NLS-1$
         }
         return null;
@@ -209,7 +207,7 @@
     {
         try
         {
-            Class clazz = (Class) factories.get(name);
+            Class clazz = factories.get(name);
             InstallerFactory ifactory = (InstallerFactory) clazz.newInstance();
             return ifactory;
         }
@@ -223,7 +221,7 @@
     /**
      * Accessor for the known installers
      */
-    public Map getInstallers()
+    public Map<String, Installer> getInstallers()
     {
         return Collections.unmodifiableMap(installers);
     }
@@ -235,7 +233,7 @@
      */
     public Installer getInstaller(String name)
     {
-        return (Installer) installers.get(name);
+        return installers.get(name);
     }
 
     /**
@@ -265,7 +263,7 @@
         for (Iterator it = installers.keySet().iterator(); it.hasNext(); )
         {
             String tname = (String) it.next();
-            Installer tinstaller = (Installer) installers.get(tname);
+            Installer tinstaller = installers.get(tname);
 
             if (tinstaller.equals(installer))
             {
@@ -289,7 +287,7 @@
     {
         if (installers.containsKey(name))
         {
-            Installer old = (Installer) installers.remove(name);
+            Installer old = installers.remove(name);
             fireInstallersChanged(this, old, false);
         }
     }
@@ -350,7 +348,7 @@
     /**
      * The map of installer factories
      */
-    private Map factories;
+    private Map<String, Class> factories;
 
     /**
      * The log stream
@@ -360,7 +358,7 @@
     /**
      * The list of discovered installers
      */
-    private Map installers;
+    private Map<String, Installer> installers;
 
     /**
      * The list of listeners

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/ReadingsBook.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/ReadingsBook.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/ReadingsBook.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -143,7 +143,7 @@
             div.addContent(title);
             text.addContent(div);
 
-            String readings = (String) hash.get(key);
+            String readings = hash.get(key);
             if (readings == null)
             {
                 throw new BookException(Msg.NOT_FOUND, new Object[] { key.getName() });
@@ -247,7 +247,7 @@
     /**
      * The store of keys and data
      */
-    private Map hash = new TreeMap();
+    private Map<Key, String> hash = new TreeMap<Key, String>();
 
     /**
      * The log stream

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntry.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntry.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntry.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -222,7 +222,7 @@
             if (values == null)
             {
                 histogram.increment(confEntryName);
-                values = new ArrayList();
+                values = new ArrayList<String>();
             }
             if (reportDetails())
             {
@@ -393,9 +393,9 @@
         return copy;
     }
 
-    private List processLines(OSISUtil.OSISFactory factory, String aValue)
+    private List<Element> processLines(OSISUtil.OSISFactory factory, String aValue)
     {
-        List list = new ArrayList();
+        List<Element> list = new ArrayList<Element>();
         String [] lines = StringUtil.splitAll(aValue, '\n');
         for (int i = 0; i < lines.length; i++)
         {
@@ -418,6 +418,6 @@
     private ConfigEntryType type;
     private String internal;
     private String name;
-    private List values;
+    private List<String> values;
     private String value;
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -121,7 +121,7 @@
      */
     public Object getValue(ConfigEntryType type)
     {
-        ConfigEntry ce = (ConfigEntry) table.get(type);
+        ConfigEntry ce = table.get(type);
         if (ce != null)
         {
             return ce.getValue();
@@ -139,7 +139,7 @@
      */
     public boolean match(ConfigEntryType type, Object search)
     {
-        ConfigEntry ce = (ConfigEntry) table.get(type);
+        ConfigEntry ce = table.get(type);
         return ce != null && ce.match(search);
     }
 
@@ -206,7 +206,7 @@
             // Create a configEntry so that the name is normalized.
             ConfigEntry configEntry = new ConfigEntry(internal, key);
 
-            ConfigEntry e = (ConfigEntry) table.get(configEntry.getType());
+            ConfigEntry e = table.get(configEntry.getType());
 
             if (e == null)
             {
@@ -565,7 +565,7 @@
         Element title = null;
         for (int i = 0; i < category.length; i++)
         {
-            ConfigEntry entry = (ConfigEntry) table.get(category[i]);
+            ConfigEntry entry = table.get(category[i]);
             Element configElement = null;
 
             if (entry != null)
@@ -682,7 +682,7 @@
     /**
      * A map of lists of known config entries.
      */
-    private Map table = new HashMap();
+    private Map<ConfigEntryType, ConfigEntry> table = new HashMap<ConfigEntryType, ConfigEntry>();
 
     /**
      * The original name of this config file from mods.d.

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -182,7 +182,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "BOOK", //$NON-NLS-1$
             "CHAPTER", //$NON-NLS-1$
@@ -225,7 +225,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "Daily Devotional", //$NON-NLS-1$
             "Glossaries", //$NON-NLS-1$
@@ -290,7 +290,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "LZSS", //$NON-NLS-1$
             "ZIP", //$NON-NLS-1$
@@ -467,7 +467,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             DIRECTION_LTOR,
             DIRECTION_RTOL,
@@ -533,7 +533,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "Public Domain", //$NON-NLS-1$
             "Copyrighted; Free non-commercial distribution", //$NON-NLS-1$
@@ -608,7 +608,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "Latin-1", //$NON-NLS-1$
             "UTF-8", //$NON-NLS-1$
@@ -651,7 +651,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "GBFStrongs", //$NON-NLS-1$
             "GBFFootnotes", //$NON-NLS-1$
@@ -775,7 +775,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "StrongsNumbers", //$NON-NLS-1$
             "GreekDef", //$NON-NLS-1$
@@ -841,7 +841,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(new String[]
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(new String[]
         {
             "RawText",  //$NON-NLS-1$
             "zText",  //$NON-NLS-1$
@@ -961,7 +961,7 @@
         /**
          * The set of choices.
          */
-        private final Set choices = new HashSet(Arrays.asList(choiceArray));
+        private final Set<String> choices = new HashSet<String>(Arrays.asList(choiceArray));
     },
 
     /**

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -74,7 +74,7 @@
     {
         ConfigEntry.resetStatistics();
 
-        List valid = new ArrayList();
+        List<Book> valid = new ArrayList<Book>();
 
         // Loop through the dirs in the lookup path
         for (int j = 0; j < dirs.length; j++)
@@ -126,7 +126,7 @@
 
         ConfigEntry.dumpStatistics();
 
-        return (Book[]) valid.toArray(new Book[valid.size()]);
+        return valid.toArray(new Book[valid.size()]);
     }
 
     /* (non-Javadoc)
@@ -329,7 +329,7 @@
      */
     private static File[] getDefaultPaths()
     {
-        List reply = new ArrayList();
+        List<File> reply = new ArrayList<File>();
 
         // .jsword in the users home directory is the first location
         reply.add(new File(System.getProperty(PROPERTY_USER_HOME) + File.separator + Project.DIR_PROJECT));
@@ -371,14 +371,14 @@
         // mods.d in the current directory?
         testDefaultPath(reply, new File(".").getAbsolutePath()); //$NON-NLS-1$
 
-        return (File[]) reply.toArray(new File[reply.size()]);
+        return reply.toArray(new File[reply.size()]);
     }
 
     /**
      * Check to see if the given directory is a Sword mods.d directory
      * and then add it to the list if it is.
      */
-    private static void testDefaultPath(List reply, String path)
+    private static void testDefaultPath(List<File> reply, String path)
     {
         File where = new File(path);
         File mods = new File(path, SwordConstants.DIR_CONF);

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -143,7 +143,7 @@
      */
     public String getBookCharset()
     {
-        return (String) ENCODING_JAVA.get(getProperty(ConfigEntryType.ENCODING));
+        return ENCODING_JAVA.get(getProperty(ConfigEntryType.ENCODING));
     }
 
     /**
@@ -311,7 +311,7 @@
     /**
      * The language strings need to be converted to Java charsets
      */
-    private static final Map ENCODING_JAVA = new HashMap();
+    private static final Map<String, String> ENCODING_JAVA = new HashMap<String, String>();
     static
     {
         ENCODING_JAVA.put("Latin-1", ENCODING_LATIN1); //$NON-NLS-1$

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordDictionary.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordDictionary.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordDictionary.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -72,7 +72,7 @@
 
         set = backend.readIndex();
 
-        map = new HashMap();
+        map = new HashMap<String, Key>();
         for (Iterator it = set.iterator(); it.hasNext(); )
         {
             Key key = (Key) it.next();
@@ -191,7 +191,7 @@
     {
         checkActive();
 
-        Key key = (Key) map.get(text);
+        Key key = map.get(text);
         if (key != null)
         {
             return key;
@@ -212,7 +212,7 @@
             String keyName = (String) it.next();
             if (keyName.equalsIgnoreCase(text))
             {
-                return (Key) map.get(keyName);
+                return map.get(keyName);
             }
         }
 
@@ -222,7 +222,7 @@
             String keyName = (String) it.next();
             if (keyName.startsWith(text))
             {
-                return (Key) map.get(keyName);
+                return map.get(keyName);
             }
         }
 
@@ -232,7 +232,7 @@
             String keyName = (String) it.next();
             if (keyName.indexOf(text) != -1)
             {
-                return (Key) map.get(keyName);
+                return map.get(keyName);
             }
         }
 
@@ -263,11 +263,11 @@
         String internalName = sbmd.getInitials();
         if (internalName.equals("StrongsGreek")) //$NON-NLS-1$
         {
-            key = (Key) map.get(ZERO_PAD.format(strongsNumber));
+            key = map.get(ZERO_PAD.format(strongsNumber));
         }
         else if (internalName.equals("StrongsHebrew")) //$NON-NLS-1$
         {
-            key = (Key) map.get(ZERO_PAD.format(strongsNumber));
+            key = map.get(ZERO_PAD.format(strongsNumber));
         }
         return key;
     }
@@ -308,7 +308,7 @@
     /**
      * So we can quickly find a Key given the text for the key
      */
-    private Map map;
+    private Map<String, Key> map;
 
     /**
      * So we can implement getIndex() easily

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndex.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -125,7 +125,7 @@
                 // create argument set to true.
                 IndexWriter writer = new IndexWriter(tempPath.getCanonicalPath(), new SimpleAnalyzer(), true);
 
-                List errors = new ArrayList();
+                List<Key> errors = new ArrayList<Key>();
                 generateSearchIndexImpl(job, errors, writer, book.getGlobalKeyList());
 
                 job.setProgress(95, Msg.OPTIMIZING.toString());
@@ -311,7 +311,7 @@
     /**
      * Dig down into a Key indexing as we go.
      */
-    private void generateSearchIndexImpl(Job job, List errors, IndexWriter writer, Key key) throws BookException, IOException
+    private void generateSearchIndexImpl(Job job, List<Key> errors, IndexWriter writer, Key key) throws BookException, IOException
     {
         int bookNum = 0;
         int oldBookNum = -1;

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndexManager.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndexManager.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/LuceneIndexManager.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -74,7 +74,7 @@
     {
         try
         {
-            Index reply = (Index) INDEXES.get(book);
+            Index reply = INDEXES.get(book);
             if (reply == null)
             {
                 URL storage = getStorageArea(book);
@@ -196,7 +196,7 @@
     /**
      * The created indexes
      */
-    protected static final Map INDEXES = new HashMap();
+    protected static final Map<Book, Index> INDEXES = new HashMap<Book, Index>();
 
     /**
      * The segments directory

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -33,7 +33,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
-import java.util.Vector;
 
 import org.crosswire.common.util.Logger;
 import org.crosswire.common.util.StringUtil;
@@ -119,7 +118,7 @@
             assert false : e;
         }
 
-        copy.listeners = new ArrayList();
+        copy.listeners = new ArrayList<PassageListener>();
         copy.listeners.addAll(listeners);
 
         copy.originalName  = originalName;
@@ -876,17 +875,17 @@
         PassageEvent ev = new PassageEvent(source, PassageEvent.VERSES_ADDED, start, end);
 
         // Copy listener vector so it won't change while firing
-        List temp;
+        List<PassageListener> temp;
         synchronized (listeners)
         {
-            temp = new ArrayList();
+            temp = new ArrayList<PassageListener>();
             temp.addAll(listeners);
         }
 
         // And run throught the list shouting
         for (int i = 0; i < temp.size(); i++)
         {
-            PassageListener rl = (PassageListener) temp.get(i);
+            PassageListener rl = temp.get(i);
             rl.versesAdded(ev);
         }
     }
@@ -911,17 +910,17 @@
         PassageEvent ev = new PassageEvent(source, PassageEvent.VERSES_REMOVED, start, end);
 
         // Copy listener vector so it won't change while firing
-        List temp;
+        List<PassageListener> temp;
         synchronized (listeners)
         {
-            temp = new ArrayList();
+            temp = new ArrayList<PassageListener>();
             temp.addAll(listeners);
         }
 
         // And run throught the list shouting
         for (int i = 0; i < temp.size(); i++)
         {
-            PassageListener rl = (PassageListener) temp.get(i);
+            PassageListener rl = temp.get(i);
             rl.versesRemoved(ev);
         }
     }
@@ -946,17 +945,17 @@
         PassageEvent ev = new PassageEvent(source, PassageEvent.VERSES_CHANGED, start, end);
 
         // Copy listener vector so it won't change while firing
-        List temp;
+        List<PassageListener> temp;
         synchronized (listeners)
         {
-            temp = new ArrayList();
+            temp = new ArrayList<PassageListener>();
             temp.addAll(listeners);
         }
 
         // And run throught the list shouting
         for (int i = 0; i < temp.size(); i++)
         {
-            PassageListener rl = (PassageListener) temp.get(i);
+            PassageListener rl = temp.get(i);
             rl.versesChanged(ev);
         }
     }
@@ -1342,7 +1341,7 @@
         in.defaultReadObject();
 
         // Setup
-        listeners = new Vector();
+        listeners = new ArrayList<PassageListener>();
 
         try
         {
@@ -1432,7 +1431,7 @@
     /**
      * Support for change notification
      */
-    protected transient List listeners = new Vector();
+    protected transient List<PassageListener> listeners = new ArrayList<PassageListener>();
 
     /**
      * The original string for picky users

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/BibleInfo.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/BibleInfo.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/BibleInfo.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -64,19 +64,19 @@
         fullBooksUpper = new String[BOOKS_IN_BIBLE];
 
         shortBooks = new String[BOOKS_IN_BIBLE];
-        shortBooksMap = new HashMap(BOOKS_IN_BIBLE);
+        shortBooksMap = new HashMap<String, Integer>(BOOKS_IN_BIBLE);
         shortBooksLower = new String[BOOKS_IN_BIBLE];
         shortBooksUpper = new String[BOOKS_IN_BIBLE];
 
         altBooksLower = new String[BOOKS_IN_BIBLE][];
-        altBooksMap = new HashMap(BOOKS_IN_BIBLE);
+        altBooksMap = new HashMap<String, Integer>(BOOKS_IN_BIBLE);
 
         sections = new String[SECTIONS_IN_BIBLE];
         sectionsLower = new String[SECTIONS_IN_BIBLE];
         sectionsUpper = new String[SECTIONS_IN_BIBLE];
 
         osisBooks = new String[BOOKS_IN_BIBLE];
-        osisMap   = new HashMap(BOOKS_IN_BIBLE);
+        osisMap   = new HashMap<String, Integer>(BOOKS_IN_BIBLE);
 
         ResourceBundle resources = ResourceBundle.getBundle(BibleInfo.class.getName(), Locale.getDefault(), new CWClassLoader(BibleInfo.class));
 
@@ -322,13 +322,13 @@
         }
 
         // Favor OSIS names.
-        Integer bookNum = (Integer) osisMap.get(find);
+        Integer bookNum = osisMap.get(find);
         if (bookNum != null)
         {
             return bookNum.intValue();
         }
 
-        bookNum = (Integer) osisMap.get(find.replaceFirst(" ", "")); //$//$NON-NLS-1$ //$NON-NLS-2$
+        bookNum = osisMap.get(find.replaceFirst(" ", "")); //$//$NON-NLS-1$ //$NON-NLS-2$
         if (bookNum != null)
         {
             return bookNum.intValue();
@@ -336,13 +336,13 @@
 
         String match = find.toLowerCase();
 
-        bookNum = (Integer) shortBooksMap.get(match);
+        bookNum = shortBooksMap.get(match);
         if (bookNum != null)
         {
             return bookNum.intValue();
         }
 
-        bookNum = (Integer) altBooksMap.get(match);
+        bookNum = altBooksMap.get(match);
         if (bookNum != null)
         {
             return bookNum.intValue();
@@ -1062,7 +1062,7 @@
     private static String[] shortBooksLower;
 
     /** Standard shortened names for the book of the Bible, in lower case, generated at runtime. */
-    private static Map shortBooksMap;
+    private static Map<String, Integer> shortBooksMap;
 
     /** Standard shortened names for the book of the Bible, in upper case, generated at run time */
     private static String[] shortBooksUpper;
@@ -1071,13 +1071,13 @@
     private static String[][] altBooksLower;
 
     /** Alternative shortened names for the book of the Bible, in lower case, generated at run time */
-    private static Map altBooksMap;
+    private static Map<String, Integer> altBooksMap;
 
     /** Standard OSIS names for the book of the Bible, in mixed case */
     private static String[] osisBooks;
 
     /** Standard OSIS names for the book of the Bible, in mixed case */
-    private static Map osisMap;
+    private static Map<String, Integer> osisMap;
 
     /** Standard names for the sections */
     private static String[] sections;

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultKeyList.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultKeyList.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultKeyList.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -125,7 +125,7 @@
      */
     public Key get(int index)
     {
-        return (Key) keys.get(index);
+        return keys.get(index);
     }
 
     /* (non-Javadoc)
@@ -160,7 +160,7 @@
     /**
      * The store of Keys
      */
-    private List keys = new ArrayList();
+    private List<Key> keys = new ArrayList<Key>();
 
     /**
      * The log stream

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/DistinctPassage.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/DistinctPassage.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/DistinctPassage.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -70,7 +70,7 @@
     {
         super(refs);
 
-        store = Collections.synchronizedSortedSet(new TreeSet());
+        store = Collections.synchronizedSortedSet(new TreeSet<Verse>());
         addVerses(refs);
     }
 
@@ -93,7 +93,7 @@
         //   copy.store = (SortedSet) store.clone();
         // However SortedSet is not Clonable so I can't
         // Watch out for this, I'm not sure if it breaks anything.
-        copy.store = new TreeSet();
+        copy.store = new TreeSet<Verse>();
         copy.store.addAll(store);
 
         return copy;
@@ -223,7 +223,7 @@
     {
         optimizeWrites();
 
-        store = new TreeSet();
+        store = new TreeSet<Verse>();
         readObjectSupport(in);
     }
 
@@ -235,5 +235,5 @@
     /**
      * The place the real data is stored
      */
-    private transient SortedSet store = new TreeSet();
+    private transient SortedSet<Verse> store = new TreeSet<Verse>();
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageTally.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -950,7 +950,7 @@
          */
         protected OrderedVerseIterator(int[] board)
         {
-            TreeSet output = new TreeSet();
+            TreeSet<TalliedVerse> output = new TreeSet<TalliedVerse>();
 
             int vib = BibleInfo.versesInBible();
             for (int i = 0; i < vib; i++)
@@ -1078,7 +1078,7 @@
          */
         public OrderedVerseRangeIterator(Iterator vit, int[] board)
         {
-            TreeSet output = new TreeSet();
+            TreeSet<TalliedVerseRange> output = new TreeSet<TalliedVerseRange>();
 
             Iterator rit = new VerseRangeIterator(vit, RestrictionType.NONE);
             while (rit.hasNext())

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/RangedPassage.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/RangedPassage.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/RangedPassage.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -60,7 +60,7 @@
      */
     protected RangedPassage()
     {
-        store = new TreeSet();
+        store = new TreeSet<VerseRange>();
     }
 
     /**
@@ -80,7 +80,7 @@
     {
         super(refs);
 
-        store = new TreeSet();
+        store = new TreeSet<VerseRange>();
         addVerses(refs);
         normalize();
     }
@@ -98,7 +98,7 @@
         //   copy.store = (SortedSet) store.clone();
         // However SortedSet is not Clonable so I can't
         // Watch out for this, I'm not sure if it breaks anything.
-        copy.store = new TreeSet();
+        copy.store = new TreeSet<VerseRange>();
         copy.store.addAll(store);
 
         return copy;
@@ -236,7 +236,7 @@
         boolean removed = false;
 
         // This allows us to modify store which iterating through a copy
-        SortedSet new_store = new TreeSet();
+        SortedSet<VerseRange> new_store = new TreeSet<VerseRange>();
         new_store.addAll(store);
         Iterator it = new_store.iterator();
 
@@ -283,7 +283,7 @@
 
         optimizeWrites();
 
-        SortedSet new_store = new TreeSet();
+        SortedSet<VerseRange> new_store = new TreeSet<VerseRange>();
 
         Iterator that_it = null;
         if (that instanceof RangedPassage)
@@ -340,7 +340,7 @@
 
         VerseRange last = null;
         VerseRange next = null;
-        SortedSet new_store = new TreeSet();
+        SortedSet<VerseRange> new_store = new TreeSet<VerseRange>();
 
         Iterator it = rangeIterator(RestrictionType.NONE);
         while (it.hasNext())
@@ -385,7 +385,7 @@
         {
             try
             {
-                SortedSet temp = new TreeSet();
+                SortedSet<Verse> temp = new TreeSet<Verse>();
 
                 while (it.hasNext())
                 {
@@ -554,7 +554,7 @@
     {
         optimizeWrites();
 
-        store = new TreeSet();
+        store = new TreeSet<VerseRange>();
         readObjectSupport(in);
     }
 
@@ -566,5 +566,5 @@
     /**
      * The place the real data is stored
      */
-    private transient SortedSet store;
+    private transient SortedSet<VerseRange> store;
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/ReadOnlyPassage.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/ReadOnlyPassage.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/ReadOnlyPassage.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -442,4 +442,5 @@
      * Serialization ID
      */
     private static final long serialVersionUID = 3257853173036102193L;
+
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/SetKeyList.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/SetKeyList.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/SetKeyList.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -40,7 +40,7 @@
     /**
      * Simple ctor
      */
-    public SetKeyList(Set set)
+    public SetKeyList(Set<Key> set)
     {
         list.addAll(set);
     }
@@ -48,7 +48,7 @@
     /**
      * Simple ctor
      */
-    public SetKeyList(Set set, String name)
+    public SetKeyList(Set<Key> set, String name)
     {
         list.addAll(set);
         setName(name);
@@ -57,7 +57,7 @@
     /**
      * Simple ctor
      */
-    public SetKeyList(Set set, Key parent)
+    public SetKeyList(Set<Key> set, Key parent)
     {
         list.addAll(set);
         this.parent = parent;
@@ -66,7 +66,7 @@
     /**
      * Simple ctor
      */
-    public SetKeyList(Set set, Key parent, String name)
+    public SetKeyList(Set<Key> set, Key parent, String name)
     {
         list.addAll(set);
         this.parent = parent;
@@ -162,7 +162,7 @@
      */
     public Key get(int index)
     {
-        return (Key) list.get(index);
+        return list.get(index);
     }
 
     /* (non-Javadoc)
@@ -197,7 +197,7 @@
     /**
      * The Set that we are proxying to
      */
-    private List list = new ArrayList();
+    private List<Key> list = new ArrayList<Key>();
 
     /**
      * The log stream

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/util/ConverterFactory.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/util/ConverterFactory.java	2006-03-05 12:37:21 UTC (rev 1035)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/util/ConverterFactory.java	2006-03-05 12:38:55 UTC (rev 1036)
@@ -65,7 +65,7 @@
     /**
      * Get a map of the known converters, by looking up the answers in Project
      */
-    public static Map getKnownConverters()
+    public static Map<String, Class> getKnownConverters()
     {
         return ClassUtil.getImplementorsMap(Converter.class);
     }



More information about the jsword-svn mailing list