Created
December 17, 2015 11:04
-
-
Save freakboy3742/03f8cbd63559d9c89330 to your computer and use it in GitHub Desktop.
Why I like Python, volume 3742
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.python.java; | |
public class Object extends org.python.types.Object { | |
static | |
// public static org.python.Object convert(java.lang.Object java) { | |
// if (java instanceof java.lang.String) { | |
// return new org.python.types.Str((java.lang.String) java); | |
// } else { | |
// return new org.python.java.Object(java); | |
// } | |
// } | |
public java.lang.Object object; | |
public int hashCode() { | |
return this.object.hashCode(); | |
} | |
public java.lang.Object toJava() { | |
return this.object; | |
} | |
public java.lang.Object toObject() { | |
return this.object; | |
} | |
public Object(java.lang.Object object) { | |
this(org.python.types.Type.Origin.JAVA, object); | |
} | |
public Object(org.python.types.Type.Origin origin, java.lang.Object object) { | |
super(origin, object.getClass()); | |
this.object = object; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment