Java Bit Shift shiftLeft(char ch)

Here you can find the source of shiftLeft(char ch)

Description

shift Left

License

Open Source License

Declaration

public static char shiftLeft(char ch) 

Method Source Code

//package com.java2s;
/*//from ww w .j a v a  2s  . c  o  m
 * The MIT License
 *
 * Copyright (c) 2008 Virasak Dungsrikaew (virasak@gmail.com)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
    
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
    
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

public class Main {
    public static final char MAI_HAN_AKAT = 0xE31;
    public static final char SARA_I = 0xE34;
    public static final char SARA_Ii = 0xE35;
    public static final char SARA_Ue = 0xE36;
    public static final char SARA_Uee = 0xE37;
    public static final char MAI_TAI_KHU = 0xE47;
    public static final char MAI_HAN_AKAT_LEFT_SHIFT = 0xF710;
    public static final char SARA_I_LEFT_SHIFT = 0xF701;
    public static final char SARA_Ii_LEFT_SHIFT = 0xF702;
    public static final char SARA_Ue_LEFT_SHIFT = 0xF703;
    public static final char SARA_Uee_LEFT_SHIFT = 0xF704;
    public static final char MAI_TAI_KHU_LEFT_SHIFT = 0xF712;
    public static final char MAI_EK = 0xE48;
    public static final char MAI_THO = 0xE49;
    public static final char MAI_TRI = 0xE4A;
    public static final char MAI_CHATTAWA = 0xE4B;
    public static final char NIKHAHIT = 0xE4D;
    public static final char MAI_EK_LEFT_SHIFT = 0xF713;
    public static final char MAI_THO_LEFT_SHIFT = 0xF714;
    public static final char MAI_TRI_LEFT_SHIFT = 0xF715;
    public static final char MAI_CHATTAWA_LEFT_SHIFT = 0xF716;
    public static final char NIKHAHIT_LEFT_SHIFT = 0xF711;

    public static char shiftLeft(char ch) {
        switch (ch) {
        case MAI_EK:
            return MAI_EK_LEFT_SHIFT;
        case MAI_THO:
            return MAI_THO_LEFT_SHIFT;
        case MAI_TRI:
            return MAI_TRI_LEFT_SHIFT;
        case MAI_CHATTAWA:
            return MAI_CHATTAWA_LEFT_SHIFT;
        case MAI_HAN_AKAT:
            return MAI_HAN_AKAT_LEFT_SHIFT;
        case SARA_I:
            return SARA_I_LEFT_SHIFT;
        case SARA_Ii:
            return SARA_Ii_LEFT_SHIFT;
        case SARA_Ue:
            return SARA_Ue_LEFT_SHIFT;
        case SARA_Uee:
            return SARA_Uee_LEFT_SHIFT;
        case MAI_TAI_KHU:
            return MAI_TAI_KHU_LEFT_SHIFT;
        case NIKHAHIT:
            return NIKHAHIT_LEFT_SHIFT;
        default:
            return ch;
        }
    }
}

Related

  1. shiftDouble(Object o, double shift, String suffix)
  2. shiftHorizontally(int inkX, int inkXWidth, int textWidth)
  3. shiftIdentifier(StringBuffer buffer, int posBegin, int posEnd)
  4. shiftKeyword(StringBuffer buffer, int posBegin, int posEnd, String keyword, boolean ignoreCase, boolean wholeWord)
  5. shiftLastAlphabets(String id)
  6. shiftLeft(final Character orig, final int shiftDistance)
  7. shiftPath(String uri)
  8. shiftsForNextPowerOfTwo(final int targetSize)
  9. shiftText(final int pads, final String padding, String textPassed)