com.intellij.formatting
Enum WrapType

java.lang.Object
  extended by java.lang.Enum<WrapType>
      extended by com.intellij.formatting.WrapType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<WrapType>

public enum WrapType
extends java.lang.Enum<WrapType>

Defines possible types of a wrap.

See Also:
Wrap.createWrap(WrapType, boolean), Wrap.createChildWrap(Wrap, WrapType, boolean)

Enum Constant Summary
ALWAYS
          A line break is always inserted before the start of the element.
CHOP_DOWN_IF_LONG
          A line break is inserted before the start of the element if it is a part of list of elements of the same type and at least one of the elements was wrapped.
NONE
          A line break is never inserted before the start of the element.
NORMAL
          A line break is inserted before the start of the element if the right edge of the element goes beyond the specified wrap margin.
 
Method Summary
static WrapType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static WrapType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ALWAYS

public static final WrapType ALWAYS
A line break is always inserted before the start of the element. This corresponds to the "Wrap always" setting in Global Code Style | Wrapping.


NORMAL

public static final WrapType NORMAL
A line break is inserted before the start of the element if the right edge of the element goes beyond the specified wrap margin. This corresponds to the "Wrap if long" setting in Global Code Style | Wrapping.


NONE

public static final WrapType NONE
A line break is never inserted before the start of the element. This corresponds to the "Do not wrap" setting in Global Code Style | Wrapping.


CHOP_DOWN_IF_LONG

public static final WrapType CHOP_DOWN_IF_LONG
A line break is inserted before the start of the element if it is a part of list of elements of the same type and at least one of the elements was wrapped. This corresponds to the "Chop down if long" setting in Global Code Style | Wrapping.

Method Detail

values

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

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

valueOf

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