| PassageUtil.java |
1 /**
2 * Distribution License:
3 * JSword is free software; you can redistribute it and/or modify it under
4 * the terms of the GNU Lesser General Public License, version 2.1 as published by
5 * the Free Software Foundation. This program is distributed in the hope
6 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
7 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 * See the GNU Lesser General Public License for more details.
9 *
10 * The License is available on the internet at:
11 * http://www.gnu.org/copyleft/lgpl.html
12 * or by writing to:
13 * Free Software Foundation, Inc.
14 * 59 Temple Place - Suite 330
15 * Boston, MA 02111-1307, USA
16 *
17 * Copyright: 2005
18 * The copyright to this program is held by it's authors.
19 *
20 * ID: $Id: PassageUtil.java 1966 2009-10-30 01:15:14Z dmsmith $
21 */
22 package org.crosswire.jsword.passage;
23
24 /**
25 * A Utility class containing various static methods.
26 *
27 * @see gnu.lgpl.License for license details.<br>
28 * The copyright to this program is held by it's authors.
29 * @author Joe Walker [joe at eireneh dot com]
30 */
31 public final class PassageUtil {
32 /**
33 * Prevent instantiation
34 */
35 private PassageUtil() {
36 }
37
38 /**
39 * Do we remember the original string used to configure us?
40 *
41 * @param persistentNaming
42 * True to keep the old string False (default) to generate a new
43 * better one
44 */
45 public static void setPersistentNaming(boolean persistentNaming) {
46 PassageUtil.persistentNaming = persistentNaming;
47 }
48
49 /**
50 * Do we remember the original string used to configure us?
51 *
52 * @return True if we keep the old string False (default) if we generate a
53 * new better one
54 */
55 public static boolean isPersistentNaming() {
56 return persistentNaming;
57 }
58
59 /**
60 * By default do we remember the original string used to configure us?
61 *
62 * @return false getDefaultPersistentNaming() is always false
63 */
64 public static boolean getDefaultPersistentNaming() {
65 return false;
66 }
67
68 /**
69 * Do we store the original string?
70 */
71 private static boolean persistentNaming = getDefaultPersistentNaming();
72 }
73