Source Code Cross Referenced for PyEnumerate.java in  » Testing » Marathon » org » python » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » Marathon » org.python.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.python.core;
002:
003:        public class PyEnumerate extends PyIterator {
004:
005:            private long en_index; /* current index of enumeration */
006:            private PyObject en_sit; /* secondary iterator of enumeration */
007:            private PyTuple en_result; /* result tuple  */
008:            protected static PyObject __methods__;
009:
010:            //~ BEGIN GENERATED REGION -- DO NOT EDIT SEE gexpose.py
011:            /* type info */
012:
013:            public static final String exposed_name = "enumerate";
014:
015:            public static final Class exposed_base = PyObject.class;
016:
017:            public static void typeSetup(PyObject dict, PyType.Newstyle marker) {
018:                class exposed_next extends PyBuiltinMethodNarrow {
019:
020:                    exposed_next(PyObject self, PyBuiltinFunction.Info info) {
021:                        super (self, info);
022:                    }
023:
024:                    public PyBuiltinFunction bind(PyObject self) {
025:                        return new exposed_next(self, info);
026:                    }
027:
028:                    public PyObject __call__() {
029:                        return ((PyEnumerate) self).enumerate_next();
030:                    }
031:
032:                }
033:                dict.__setitem__("next", new PyMethodDescr("next",
034:                        PyEnumerate.class, 0, 0, new exposed_next(null, null)));
035:                class exposed___iter__ extends PyBuiltinMethodNarrow {
036:
037:                    exposed___iter__(PyObject self, PyBuiltinFunction.Info info) {
038:                        super (self, info);
039:                    }
040:
041:                    public PyBuiltinFunction bind(PyObject self) {
042:                        return new exposed___iter__(self, info);
043:                    }
044:
045:                    public PyObject __call__() {
046:                        return ((PyEnumerate) self).enumerate___iter__();
047:                    }
048:
049:                }
050:                dict.__setitem__("__iter__", new PyMethodDescr("__iter__",
051:                        PyEnumerate.class, 0, 0, new exposed___iter__(null,
052:                                null)));
053:                dict.__setitem__("__new__", new PyNewWrapper(PyEnumerate.class,
054:                        "__new__", -1, -1) {
055:
056:                    public PyObject new_impl(boolean init, PyType subtype,
057:                            PyObject[] args, String[] keywords) {
058:                        return enumerate_new(this , init, subtype, args,
059:                                keywords);
060:                    }
061:
062:                });
063:            }
064:
065:            //~ END GENERATED REGION -- DO NOT EDIT SEE gexpose.py
066:
067:            public PyObject enumerate_next() {
068:                return next();
069:            }
070:
071:            public PyObject enumerate___iter__() {
072:                return __iter__();
073:            }
074:
075:            public static PyEnumerate enumerate_new(PyObject new_,
076:                    boolean init, PyType subtype, PyObject[] args,
077:                    String[] keywords) {
078:                if (args.length != 1) {
079:                    throw PyBuiltinFunction.DefaultInfo.unexpectedCall(
080:                            args.length, false, exposed_name, 0, 1);
081:                }
082:                return new PyEnumerate(args[0]);
083:            }
084:
085:            public PyEnumerate(PyObject seq) {
086:                en_index = 0;
087:                en_sit = seq.__iter__();
088:            }
089:
090:            public PyObject __iternext__() {
091:                PyObject next_item;
092:                PyObject next_index;
093:
094:                next_item = en_sit.__iternext__();
095:                if (next_item == null) {
096:                    if (en_sit instanceof  PyIterator
097:                            && ((PyIterator) en_sit).stopException != null) {
098:                        stopException = ((PyIterator) en_sit).stopException;
099:                    }
100:                    return null;
101:                }
102:                next_index = new PyInteger((int) en_index);
103:                en_index++;
104:
105:                en_result = new PyTuple(
106:                        new PyObject[] { next_index, next_item });
107:                return en_result;
108:            }
109:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.