org.rythmengine.utils
Enum Escape

java.lang.Object
  extended by java.lang.Enum<Escape>
      extended by org.rythmengine.utils.Escape
All Implemented Interfaces:
Serializable, Comparable<Escape>

public enum Escape
extends Enum<Escape>

Escape


Enum Constant Summary
CSV
          CSV escape scheme
HTML
          HTML escape scheme
JS
          javascript escape scheme
JSON
          JSON escape scheme
RAW
          Indicate raw escape scheme, i.e.
XML
          XML escape scheme
 
Method Summary
protected  RawData apply_(String s)
           
 RawData apply(Object o)
          Apply this escape scheme to the object's string representation
static String[] stringValues()
           
static Escape valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Escape valueOfIngoreCase(ITemplate template, Object o)
           
static Escape valueOfIngoreCase(Object o)
           
static Escape[] 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

RAW

public static final Escape RAW
Indicate raw escape scheme, i.e. no other escape scheme should apply


CSV

public static final Escape CSV
CSV escape scheme


HTML

public static final Escape HTML
HTML escape scheme


JS

public static final Escape JS
javascript escape scheme


JSON

public static final Escape JSON
JSON escape scheme


XML

public static final Escape XML
XML escape scheme

Method Detail

values

public static Escape[] 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 (Escape c : Escape.values())
    System.out.println(c);

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

valueOf

public static Escape 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

apply

public RawData apply(Object o)
Apply this escape scheme to the object's string representation

Parameters:
o -
Returns:
the raw data been processed out from the object

apply_

protected RawData apply_(String s)

stringValues

public static String[] stringValues()

valueOfIngoreCase

public static Escape valueOfIngoreCase(Object o)

valueOfIngoreCase

public static Escape valueOfIngoreCase(ITemplate template,
                                       Object o)


Copyright © 2013. All Rights Reserved.