org.htmlcleaner
Enum Display

java.lang.Object
  extended by java.lang.Enum<Display>
      extended by org.htmlcleaner.Display
All Implemented Interfaces:
Serializable, Comparable<Display>

public enum Display
extends Enum<Display>

Most HTML 4 elements permitted within the BODY are classified as either block-level elements or inline elements. This enumeration contains corresponding constants to distinguish them.

Author:
Konstantin Burov (aectann@gmail.com)

Enum Constant Summary
any
          The following elements may be used as either block-level elements or inline elements.
block
          Block-level elements typically contain inline elements and other block-level elements.
inline
          Inline elements typically may only contain text and other inline elements.
none
          Elements that are not actually inline or block, usually such elements are not rendered at all.
 
Method Summary
 boolean isAfterTagLineBreakNeeded()
           
 boolean isLeadingAndEndWhitespacesAllowed()
           
static Display valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Display[] 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

block

public static final Display block
Block-level elements typically contain inline elements and other block-level elements. When rendered visually, block-level elements usually begin on a new line.


inline

public static final Display inline
Inline elements typically may only contain text and other inline elements. When rendered visually, inline elements do not usually begin on a new line.


any

public static final Display any
The following elements may be used as either block-level elements or inline elements. If used as inline elements (e.g., within another inline element or a P), these elements should not contain any block-level elements.


none

public static final Display none
Elements that are not actually inline or block, usually such elements are not rendered at all.

Method Detail

values

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

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

valueOf

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

isAfterTagLineBreakNeeded

public boolean isAfterTagLineBreakNeeded()
Returns:
true to advise serializers to put line break after tags with such a display type.

isLeadingAndEndWhitespacesAllowed

public boolean isLeadingAndEndWhitespacesAllowed()
Returns:
true if tag contents can have single leading or end whitespace


Copyright © 2006-2014. All Rights Reserved.