Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**
     * box the boolean to Boolean
     */
    public static Boolean boxed(boolean v) {
        return Boolean.valueOf(v);
    }

    /**
     * box the char to Character
     */
    public static Character boxed(char v) {
        return Character.valueOf(v);
    }

    /**
     * box the byte to Byte
     */
    public static Byte boxed(byte v) {
        return Byte.valueOf(v);
    }

    /**
     * box the short to Short
     */
    public static Short boxed(short v) {
        return Short.valueOf(v);
    }

    /**
     * box the int to Integer
     */
    public static Integer boxed(int v) {
        return Integer.valueOf(v);
    }

    /**
     * box the long to Long
     */
    public static Long boxed(long v) {
        return Long.valueOf(v);
    }

    /**
     * box the float to Float
     */
    public static Float boxed(float v) {
        return Float.valueOf(v);
    }

    /**
     * box the double to Double
     */
    public static Double boxed(double v) {
        return Double.valueOf(v);
    }

    /**
     * box the given type
     */
    public static <T> T boxed(T v) {
        return v;
    }
}