Java Integer Mod mode(final StringBuilder buffer, final int mode)

Here you can find the source of mode(final StringBuilder buffer, final int mode)

Description

Sets the text formatting mode.

License

Open Source License

Parameter

Parameter Description
buffer Holds messages.
mode Text formatting mode.

Return

buffer, for fluency.

Declaration

public static StringBuilder mode(final StringBuilder buffer, final int mode) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//  w w  w  . ja v  a2 s . co m
     * Sets the text formatting mode. The mode may be one of the following:
     * <ul>
     *   <li>{@link #NORMAL}</li>
     *   <li>{@link #BOLD}</li>
     *   <li>{@link #DIM}</li>
     *   <li>{@link #ITALIC_ON}</li>
     *   <li>{@link #ITALIC_OFF}</li>
     *   <li>{@link #UNDERLINE_ON}</li>
     *   <li>{@link #UNDERLINE_OFF}</li>
     *   <li>{@link #BLINKING_ON}</li>
     *   <li>{@link #BLINKING_OFF}</li>
     *   <li>{@link #REVERSE_VIDEO_ON}</li>
     *   <li>{@link #REVERSE_VIDEO_OFF}</li>
     * </ul>
     * @param buffer Holds messages.
     * @param mode Text formatting mode.
     * @return buffer, for fluency.
     */
    public static StringBuilder mode(final StringBuilder buffer, final int mode) {
        buffer.append("\u001B[").append(mode).append('m');
        return buffer;
    }
}

Related

  1. mod(long l, int m)
  2. mod4(int a)
  3. mod_diff(int x, int y, int R)
  4. modByPowerOfTwo(int value, int mod)
  5. modCeil(int x, int mod)
  6. ModEuclidean(int D, int d)
  7. modifyAlpha(int color, int alpha)
  8. modifyBase32AtIndex(final String s, final int index)
  9. modifyDummyString(String dummyString, int beginTag, int endTag)