com.overzealous.remark
Enum Options.InWordEmphasis

java.lang.Object
  extended by java.lang.Enum<Options.InWordEmphasis>
      extended by com.overzealous.remark.Options.InWordEmphasis
All Implemented Interfaces:
Serializable, Comparable<Options.InWordEmphasis>
Enclosing class:
Options

public static enum Options.InWordEmphasis
extends Enum<Options.InWordEmphasis>

Provides options for how to handle in-word emphasis.


Enum Constant Summary
ADD_SPACES
          Adds spaces around the in-word emphasis characters.
NORMAL
          Uses the default mode, which allows in-word emphasis.
REMOVE_EMPHASIS
          Removes in-word emphasis altogether.
 
Method Summary
 boolean isAdditionalSpacingNeeded()
          Returns true when Remark should add spaces around the emphasis characters.
 boolean isEmphasisPreserved()
          Returns whether or not to preserve emphasis at all.
static Options.InWordEmphasis valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Options.InWordEmphasis[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NORMAL

public static final Options.InWordEmphasis NORMAL
Uses the default mode, which allows in-word emphasis. Because Remark only uses asterisks for spacing ('*'), this mode works with parsers that disable in-word underscores ('_') but not in-word asterisks.


ADD_SPACES

public static final Options.InWordEmphasis ADD_SPACES
Adds spaces around the in-word emphasis characters. This will actually render different output. For example, My<em>Example</em>Word becomes My *Example* Word. This will actually render as My <em>Example</em> Word.


REMOVE_EMPHASIS

public static final Options.InWordEmphasis REMOVE_EMPHASIS
Removes in-word emphasis altogether. Designed for parsers that do not allow in-word asterisks or in-word underscores. This means that My<em>Example</em>Word becomes MyExampleWord.

Method Detail

values

public static Options.InWordEmphasis[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Options.InWordEmphasis c : Options.InWordEmphasis.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Options.InWordEmphasis valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isEmphasisPreserved

public boolean isEmphasisPreserved()
Returns whether or not to preserve emphasis at all.

Returns:
true if emphasis should be preserved, false to remove it altogether.

isAdditionalSpacingNeeded

public boolean isAdditionalSpacingNeeded()
Returns true when Remark should add spaces around the emphasis characters.

Returns:
true if spaces should be added.


© 2011 OverZealous Creations, LLC - BitBucket Repository