Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/eireneh/bible/passage/VerseBase.java


1   
2   package com.eireneh.bible.passage;
3   
4   import java.io.Serializable;
5   import java.util.Enumeration;
6   
7   import com.sun.java.util.collections.*;
8   
9   /**
10   * The base unit that is collected by a Passage.
11   *
12   * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
13   * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
14   * Distribution Licence:<br />
15   * Project B is free software; you can redistribute it
16   * and/or modify it under the terms of the GNU General Public License,
17   * version 2 as published by the Free Software Foundation.<br />
18   * This program is distributed in the hope that it will be useful,
19   * but WITHOUT ANY WARRANTY; without even the implied warranty of
20   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21   * General Public License for more details.<br />
22   * The License is available on the internet
23   * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
24   * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25   * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
26   * The copyright to this program is held by it's authors.
27   * </font></td></tr></table>
28   * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
29   * @see docs.Licence
30   * @author Joe Walker
31   * @version D9.I9.T7
32   * @stereotype role
33   */
34  public interface VerseBase extends Cloneable, Comparable, Serializable, PassageConstants
35  {
36      /**
37       * Translate the Passage into a human readable string
38       * @return The string representation
39       */
40      public String getName();
41  
42      /**
43       * Translate the Passage into a human readable string, with the
44       * assumption that the specified Verse has just been output, so if we
45       * are in the same book, we do not need to display the book name, and
46       * so on.
47       * @param base The verse to use to cut down unnecessary output.
48       * @return The string representation
49       */
50      public String getName(Verse base);
51  
52      /**
53       * Create an array of Verses. See note on verseElements()
54       * @return The array of verses that this makes up
55       * @see verseElements()
56       */
57      public Verse[] toVerseArray();
58  
59      /**
60       * Enumerate over the verses in this object. I remember thinking at some
61       * stage that I ought to just use one of toVerseArray() and verseElements()
62       * and contemplated removing the other one, but didn't make the change. I
63       * suspect the newer (and therefore probably better) implementation is going
64       * to be further down the file (i.e. this one), and so toVerseArray should
65       * not be used anymore. However I can't remember the reasoning behind it
66       * other than the possibility of less Object generation if you are not
67       * going to itterate over the whole array.
68       * @return A verse iterator
69       */
70      public Enumeration verseElements();
71  }