KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.python.core;
2
3 public class PyNotImplemented extends PySingleton {
4     PyNotImplemented() {
5         super("NotImplemented");
6     }
7
8     public boolean __nonzero__() {
9         return false;
10     }
11
12     public Object JavaDoc __tojava__(Class JavaDoc c) {
13         //Danger here. java.lang.Object gets null not None
14
if (c == PyObject.class)
15             return this;
16         if (c.isPrimitive())
17             return Py.NoConversion;
18         return null;
19     }
20
21     public String JavaDoc safeRepr() throws PyIgnoreMethodTag {
22         return "NotImplemented";
23     }
24
25     public boolean isMappingType() { return false; }
26     public boolean isSequenceType() { return false; }
27
28 }
29
30
Popular Tags