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

## com.mindprod.compactor
Enum HTMLState

    java.lang.Object
      java.lang.Enum<HTMLState>
          com.mindprod.compactor.HTMLState

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<HTMLState>

    public enum HTMLState

extends java.lang.Enum<HTMLState>

Collapses multiple spaces in HTML text to one.

Trims space from start and end of line.

Removes whitespace after

Removes whitespace before

Leaves whitespace alone in

    ...

Leaves whitespace alone inside "..." in tags.

Normalises newlines to either \n or platform.

Version:
  2.3, 2008-02-12 initial, more elaborate than simple Compactor

  Created by IntelliJ IDEA.
Author:
  Roedy Green

Enum Constant Summary
`IN_COMMENT`
`IN_COMMENT_COMPACTIBLE_SPACE`
`IN_COMMENT_DEAD_SPACE`
`IN_DEAD_SPACE`
`IN_PRE`
`IN_TAG`
`IN_TAG_COMPACTIBLE_SPACE`
`IN_TAG_DEAD_SPACE`
`IN_TAG_QUOTE`
`IN_TEXT`
`IN_TEXT_COMPACTIBLE_SPACE`

Method Summary
`static java.lang.String` | `compactString(java.lang.String big)` Remove excess whitespace from HTML represented by string.
`static void` | `main(java.lang.String[] args)`
`static HTMLState` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static HTMLState[]` | `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

### IN_COMMENT

    public static final HTMLState IN_COMMENT

### IN_COMMENT_COMPACTIBLE_SPACE

    public static final HTMLState IN_COMMENT_COMPACTIBLE_SPACE

### IN_COMMENT_DEAD_SPACE

    public static final HTMLState IN_COMMENT_DEAD_SPACE

### IN_DEAD_SPACE

    public static final HTMLState IN_DEAD_SPACE

### IN_PRE

    public static final HTMLState IN_PRE

### IN_TAG

    public static final HTMLState IN_TAG

### IN_TAG_COMPACTIBLE_SPACE

    public static final HTMLState IN_TAG_COMPACTIBLE_SPACE

### IN_TAG_DEAD_SPACE

    public static final HTMLState IN_TAG_DEAD_SPACE

### IN_TAG_QUOTE

    public static final HTMLState IN_TAG_QUOTE

### IN_TEXT

    public static final HTMLState IN_TEXT

### IN_TEXT_COMPACTIBLE_SPACE

    public static final HTMLState IN_TEXT_COMPACTIBLE_SPACE

Method Detail

### values

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

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

### valueOf

    public static HTMLState 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 name
    `java.lang.NullPointerException` - if the argument is null

### compactString

    public static java.lang.String compactString(java.lang.String big)

  Remove excess whitespace from HTML represented by string.

  Parameters:
    `big` - the String to compact.
  Returns:
    the compacted String, big itself if nothing changed.

### main

    public static void main(java.lang.String[] args)

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