Package org.htmlcleaner
Enum Display
- java.lang.Object
-
- java.lang.Enum<Display>
-
- org.htmlcleaner.Display
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Display>
public enum Display extends java.lang.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
Enum Constants Enum Constant Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAfterTagLineBreakNeeded()
boolean
isLeadingAndEndWhitespacesAllowed()
static Display
valueOf(java.lang.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.
-
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.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
-
-