public class Object {
public native int hashCode();
+ /* DON'T USE THIS METHOD UNLESS NECESSARY */
+ /* WE WILL DEPRECATE IT AS SOON AS INSTANCEOF WORKS */
+ public native int getType();
+
public String toString() {
return String.valueOf(this);
}
} while (length!=0);
return new String(chararray);
}
+
+ public int hashCode() {
+ int hashcode=0;
+ for(int i=0;i<count;i++)
+ hashcode=hashcode*31+value[i+offset];
+ return hashcode;
+ }
+
+ public boolean equals(Object o) {
+ if (o.getType()!=getType())
+ return false;
+ String s=(String)o;
+ if (s.count!=count)
+ return false;
+ for(int i=0;i<count;i++) {
+ if (s.value[i+s.offset]!=value[i+offset])
+ return false;
+ }
+ return true;
+ }
}
public static native void printString(String s);
public static void error() {
- System.printString("Error");
+ System.printString("Error (Use Breakpoint on ___System______error method for more information!)\n");
}
}
return (int) ___this___;
}
+int ___Object______getType____(struct ___Object___ * ptr) {
+ return ((int *)ptr)[0];
+}
+
void ___System______printString____L___String___(struct ___String___ * s) {
struct ArrayObject * chararray=s->___value___;
int i;