Enum WrapBehaviour

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

    public enum WrapBehaviour
    extends java.lang.Enum<WrapBehaviour>
    What to do when line length is exceeded.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CHAR
      Wrap at any character boundaries.
      CLIP
      Don't wrap lines automatically, but honor explicit line-feeds.
      SINGLE_LINE
      Never ever leave current line.
      WORD
      Only wrap at word boundaries.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private WrapBehaviour​(boolean allowLineFeed, boolean autoWrap, boolean keepWords)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean allowLineFeed()  
      boolean autoWrap()  
      boolean keepWords()  
      static WrapBehaviour valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static WrapBehaviour[] 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

      • SINGLE_LINE

        public static final WrapBehaviour SINGLE_LINE
        Never ever leave current line.
      • CLIP

        public static final WrapBehaviour CLIP
        Don't wrap lines automatically, but honor explicit line-feeds.
      • CHAR

        public static final WrapBehaviour CHAR
        Wrap at any character boundaries.
      • WORD

        public static final WrapBehaviour WORD
        Only wrap at word boundaries. If a single word exceeds line length, it will still be broken to line length.
    • Field Detail

      • allowLineFeed

        private final boolean allowLineFeed
      • autoWrap

        private final boolean autoWrap
      • keepWords

        private final boolean keepWords
    • Constructor Detail

      • WrapBehaviour

        private WrapBehaviour​(boolean allowLineFeed,
                              boolean autoWrap,
                              boolean keepWords)
    • Method Detail

      • values

        public static WrapBehaviour[] 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 (WrapBehaviour c : WrapBehaviour.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static WrapBehaviour 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
      • allowLineFeed

        public boolean allowLineFeed()
      • autoWrap

        public boolean autoWrap()
      • keepWords

        public boolean keepWords()