Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.passage
Class RestrictionType

    java.lang.Object
      org.crosswire.jsword.passage.RestrictionType

All Implemented Interfaces:
  Serializable

    public abstract class RestrictionType

extends Object
implements Serializable

Types of Passage Blurring Restrictions.

Author:
  Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`, Serialized Form

Field Summary
`static RestrictionType` | `CHAPTER` Blurring is restricted to the chapter
`private static RestrictionType` | `defaultBlurRestriction` A default restriction type for blurring.
`private String` | `name` The name of the RestrictionType
`private static int` | `nextObj`
`static RestrictionType` | `NONE` There is no restriction on blurring.
`private int` | `obj`
`private static RestrictionType[]` | `VALUES`

Constructor Summary
`RestrictionType(String name)` Simple ctor

Method Summary
`abstract VerseRange` | `blur(Verse verse, int blurDown, int blurUp)` Blur a verse the specified amount.
`abstract VerseRange` | `blur(VerseRange range, int blurDown, int blurUp)` Blur a verse range the specified amount.
`boolean` | `equals(Object o)` Prevent subclasses from overriding canonical identity based Object methods
`static RestrictionType` | `fromInteger(int i)` Lookup method to convert from an integer
`static RestrictionType` | `fromString(String name)` Lookup method to convert from a String
`static int` | `getBlurRestriction()` The default Blur settings.
`static RestrictionType` | `getDefaultBlurRestriction()` The default Blur settings.
`int` | `hashCode()` Prevent subclasses from overriding canonical identity based Object methods
`abstract boolean` | `isSameScope(Verse start, Verse end)` Are the two verses in the same scope.
`(package private) Object` | `readResolve()`
`static void` | `setBlurRestriction(int value)` The default Blur settings.
`int` | `toInteger()` Get an integer representation for this RestrictionType
`abstract VerseRange` | `toRange(Verse verse, int count)` Create a range from the verse having the specified number of verses.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### NONE

    public static final RestrictionType NONE

  There is no restriction on blurring.

### CHAPTER

    public static final RestrictionType CHAPTER

  Blurring is restricted to the chapter

### defaultBlurRestriction

    private static RestrictionType defaultBlurRestriction

  A default restriction type for blurring.

### name

    private String name

  The name of the RestrictionType

### nextObj

    private static int nextObj

### obj

    private final int obj

### VALUES

    private static final RestrictionType[] VALUES

Constructor Detail

### RestrictionType

    public RestrictionType(String name)

  Simple ctor

Method Detail

### isSameScope

    public abstract boolean isSameScope(Verse start,
                                        Verse end)

  Are the two verses in the same scope.

  Parameters:
    `start` - the first verse
    `end` - the second verse
  Returns:
    true if the two are in the same scope.

### blur

    public abstract VerseRange blur(VerseRange range,
                                    int blurDown,
                                    int blurUp)

  Blur a verse range the specified amount. Since verse ranges are immutable, it creates a new one.

  Parameters:
    `range` -
    `blurDown` -
    `blurUp` -
  Returns:
    a verse range after blurring.

### blur

    public abstract VerseRange blur(Verse verse,
                                    int blurDown,
                                    int blurUp)

  Blur a verse the specified amount. Since verse are immutable and refer to a single verse, it creates a verse range.

  Parameters:
    `verse` -
    `blurDown` -
    `blurUp` -
  Returns:
    a verse range after blurring

### toRange

    public abstract VerseRange toRange(Verse verse,
                                       int count)

  Create a range from the verse having the specified number of verses.

  Parameters:
    `verse` -
    `count` -
  Returns:
    a verse range created by extending a verse forward.

### toInteger

    public int toInteger()

  Get an integer representation for this RestrictionType

### fromString

    public static RestrictionType fromString(String name)

  Lookup method to convert from a String

### fromInteger

    public static RestrictionType fromInteger(int i)

  Lookup method to convert from an integer

### equals

    public final boolean equals(Object o)

  Prevent subclasses from overriding canonical identity based Object methods

  Overrides:
    `equals` in class `Object`
  See Also:
    `Object.equals(java.lang.Object)`

### hashCode

    public final int hashCode()

  Prevent subclasses from overriding canonical identity based Object methods

  Overrides:
    `hashCode` in class `Object`
  See Also:
    `Object.hashCode()`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### setBlurRestriction

    public static void setBlurRestriction(int value)

  The default Blur settings. This is used by config to set a default.

  Parameters:
    `value` - The new default blur setting

### getBlurRestriction

    public static int getBlurRestriction()

  The default Blur settings. This is used by config to manage a default setting.

  Returns:
    The current default blurRestriction setting

### getDefaultBlurRestriction

    public static RestrictionType getDefaultBlurRestriction()

  The default Blur settings. This is used by BlurCommandWord

  Returns:
    The current default blurRestriction setting

### readResolve

    Object readResolve()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD