KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > core > IdImpl1


1 package org.python.core;
2
3 public class IdImpl1 extends IdImpl {
4
5     public long id(PyObject o) {
6         if (o instanceof PyJavaInstance) {
7             return System.identityHashCode(((PyJavaInstance)o).javaProxy);
8         } else {
9             return System.identityHashCode(o);
10         }
11     }
12
13     public String JavaDoc idstr(PyObject o) {
14         return Long.toString(id(o));
15     }
16
17     public long java_obj_id(Object JavaDoc o) {
18         return System.identityHashCode(o);
19     }
20
21 }
22
Popular Tags