// Path: src/main/java/javascript/ScriptHelper.java
// public final class ScriptHelper {
//     
//     /**
//      * Sets a key/value pair of <code>Object</type> type.
//      */
//     public static native void put(String s, Object value);
//     
//     /**
//      * Sets a key/value pair of <code>boolean</code> type.
//      */
//     public static native void put(String s, boolean value);
//     
//     /**
//      * Sets a key/value pair of <code>primitive</code> type,
//      * except of type <code>boolean</code>.
//      */
//     public static native void put(String s, double value);
//     
//     //public static native Object get(String s);
// 
//     /**
//      * Executes the specified script.
//      * <b>Important</b>: In the current version the script must be a string literal.
//      * 
//      * @return the object returned by the JavaScript code
//      */
//     public static native Object eval(String script);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns an int.
//      */
//     public static native int evalInt(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a long.
//      */
//     public static native long evalLong(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns float.
//      */
//     public static native float evalFloat(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a double.
//      */
//     public static native double evalDouble(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a char.
//      */
//     public static native char evalChar(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a boolean.
//      */
//     public static native boolean evalBoolean(String jsCode);
// }


import javascript.ScriptHelper;
package java.lang;


/**
 * The Long class wraps a value of the primitive type long in an object. 
 * 
 * @author Wolfgang Kuehn
 */
public final class Long {
    
    public static final Class<Long> TYPE = null;
    
    private long value;
    
    /**
     * Constructs a newly allocated Long object that represents the specified long argument.
     */
    public Long(long l) {
        value = l;
    }
    
    /**
     * Compares this object to the specified object.
     */
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof Long)) return false;
        return ((Long) obj).value == value;
    }
    
    
    /**
     * Returns an Long object holding the specified value. Calls to this
     * method may be generated by the autoboxing feature.
     */
    public static Long valueOf(long value) {
        return new Long(value);
    }
    
    /**
     * Returns the value of this Long as a long.
     */
    public long longValue() {
        return value;
    }
    
    /**
     * Returns a String object representing this Long's value.
     */
    public String toString() {
        // Duplicate code to String#valueOf(long)
        ScriptHelper.put("l", value);
// Path: src/main/java/javascript/ScriptHelper.java
// public final class ScriptHelper {
//     
//     /**
//      * Sets a key/value pair of <code>Object</type> type.
//      */
//     public static native void put(String s, Object value);
//     
//     /**
//      * Sets a key/value pair of <code>boolean</code> type.
//      */
//     public static native void put(String s, boolean value);
//     
//     /**
//      * Sets a key/value pair of <code>primitive</code> type,
//      * except of type <code>boolean</code>.
//      */
//     public static native void put(String s, double value);
//     
//     //public static native Object get(String s);
// 
//     /**
//      * Executes the specified script.
//      * <b>Important</b>: In the current version the script must be a string literal.
//      * 
//      * @return the object returned by the JavaScript code
//      */
//     public static native Object eval(String script);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns an int.
//      */
//     public static native int evalInt(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a long.
//      */
//     public static native long evalLong(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns float.
//      */
//     public static native float evalFloat(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a double.
//      */
//     public static native double evalDouble(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a char.
//      */
//     public static native char evalChar(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a boolean.
//      */
//     public static native boolean evalBoolean(String jsCode);
// }


// Path: src/main/java/java/lang/Long.java
import javascript.ScriptHelper;

package java.lang;


/**
 * The Long class wraps a value of the primitive type long in an object. 
 * 
 * @author Wolfgang Kuehn
 */
public final class Long {
    
    public static final Class<Long> TYPE = null;
    
    private long value;
    
    /**
     * Constructs a newly allocated Long object that represents the specified long argument.
     */
    public Long(long l) {
        value = l;
    }
    
    /**
     * Compares this object to the specified object.
     */
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof Long)) return false;
        return ((Long) obj).value == value;
    }
    
    
    /**
     * Returns an Long object holding the specified value. Calls to this
     * method may be generated by the autoboxing feature.
     */
    public static Long valueOf(long value) {
        return new Long(value);
    }
    
    /**
     * Returns the value of this Long as a long.
     */
    public long longValue() {
        return value;
    }
    
    /**
     * Returns a String object representing this Long's value.
     */
    public String toString() {
        // Duplicate code to String#valueOf(long)
        ScriptHelper.put("l", value);
        return (String) ScriptHelper.eval("String(l)");