Java Integer to IntToPackage(int pack)

Here you can find the source of IntToPackage(int pack)

Description

get an int into char depending on the package it represent

License

Open Source License

Parameter

Parameter Description
pack the package you want to chance

Return

"A" for 0,"B" for 0 ....

Declaration

public static char IntToPackage(int pack) 

Method Source Code

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

public class Main {
    /**//from   w ww  . j  a v a2  s. co m
     *get an int into char depending on the package it represent
     * 
     * @param pack    the package you want to chance
     * @return    "A" for 0,"B" for 0 ....
     *       
     */
    public static char IntToPackage(int pack) { // package to int A = 0  Z = 25 
        char iPack;
        pack = pack + 65;
        iPack = (char) pack;

        if (pack >= 65 && pack <= 90)
            return iPack;
        else
            return '#';
    }
}

Related

  1. intToOctal(int value)
  2. IntToOctString(final int value)
  3. intToOneByte(int i)
  4. intToOneByte(int value)
  5. intToOneByteArray(int number)
  6. intToPaddedString(int value, int pad)
  7. intToPercent(int value)
  8. intToPlusMin(int i)
  9. intToPrefixCoded(final int val, final int shift, final char[] buffer)