Java Doc for TreePosition.java in  » Scripting » Kawa » gnu » lists » 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 » Scripting » Kawa » gnu.lists 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gnu.lists.SeqPosition
      gnu.lists.TreePosition

All known Subclasses:   gnu.kawa.xml.Focus,
TreePosition
public class TreePosition extends SeqPosition implements Cloneable(Code)
A position that can also go down and up in a tree. A TreePosition is a stack of positions. The "current" position (i.e. the one you get if you tree the TreePosition as a SeqPosition) is that in the innermost containing sequence. Normally, the "current" element is (the one following) a position in a sequence. As a special (initial case), we may want to treat the entire sequence is the "current element". This is represented by depth==-1 and xpos set to the root element (which need not actually be a sequence).


Field Summary
 intdepth
     Depth of the above stacks. Note that getDepth returns depth+1; this should perhaps match.
 int[]istack
     Stack of pushed values for iposition.
 AbstractSequence[]sstack
     Stack of pushed values for sequence.
 intstart
     Start of stacks - anything below 'start' is ignored. This is useful for pushing/pop positions without object allocation.

Constructor Summary
public  TreePosition()
    
public  TreePosition(Object root)
     Not a position *in* a sequence, but the current element is the entire sequence.
public  TreePosition(AbstractSequence seq, int index)
    
public  TreePosition(TreePosition pos)
    

Method Summary
public  Objectclone()
    
public  voiddump()
     Copy this position into pos.
public  ObjectgetAncestor(int up)
     Get the value of an ancestor node.
Parameters:
  up - the number parents to go up.
public  intgetDepth()
     Number of ancestor sequences, including current sequence.
public  ObjectgetPosNext()
    
public  AbstractSequencegetRoot()
     Get the "root document".
public  booleangotoAttributesStart()
     Set position before first attribute (of the element following position).
public  booleangotoChildrenStart()
     Set position before first child (of the element following position).
final public  booleangotoParent()
    
public  voidpop()
    
public  voidpopNoRelease()
    
public  voidpush(AbstractSequence child, int iposChild)
    
public  voidrelease()
    
public  voidset(TreePosition position)
    

Field Detail
depth
int depth(Code)
Depth of the above stacks. Note that getDepth returns depth+1; this should perhaps match.



istack
int[] istack(Code)
Stack of pushed values for iposition.



sstack
AbstractSequence[] sstack(Code)
Stack of pushed values for sequence.



start
int start(Code)
Start of stacks - anything below 'start' is ignored. This is useful for pushing/pop positions without object allocation.




Constructor Detail
TreePosition
public TreePosition()(Code)



TreePosition
public TreePosition(Object root)(Code)
Not a position *in* a sequence, but the current element is the entire sequence.



TreePosition
public TreePosition(AbstractSequence seq, int index)(Code)



TreePosition
public TreePosition(TreePosition pos)(Code)




Method Detail
clone
public Object clone()(Code)



dump
public void dump()(Code)
Copy this position into pos.



getAncestor
public Object getAncestor(int up)(Code)
Get the value of an ancestor node.
Parameters:
  up - the number parents to go up. if up is 0, same getNext. Otherwise get parentapplied as specified.



getDepth
public int getDepth()(Code)
Number of ancestor sequences, including current sequence.



getPosNext
public Object getPosNext()(Code)



getRoot
public AbstractSequence getRoot()(Code)
Get the "root document".



gotoAttributesStart
public boolean gotoAttributesStart()(Code)
Set position before first attribute (of the element following position). This is used to iterate through the sequence of attributes.



gotoChildrenStart
public boolean gotoChildrenStart()(Code)
Set position before first child (of the element following position). true if there is a child sequence (which might be empty);false if current position is end of sequence or following elementis atomic (cannot have children).



gotoParent
final public boolean gotoParent()(Code)



pop
public void pop()(Code)



popNoRelease
public void popNoRelease()(Code)



push
public void push(AbstractSequence child, int iposChild)(Code)



release
public void release()(Code)



set
public void set(TreePosition position)(Code)



Fields inherited from gnu.lists.SeqPosition
public int ipos(Code)(Java Doc)
public AbstractSequence sequence(Code)(Java Doc)

Methods inherited from gnu.lists.SeqPosition
public void add(Object o)(Code)(Java Doc)
public SeqPosition copy()(Code)(Java Doc)
public void finalize()(Code)(Java Doc)
final public int fromEndIndex()(Code)(Java Doc)
public int getContainingSequenceSize()(Code)(Java Doc)
public Object getNext()(Code)(Java Doc)
public int getNextKind()(Code)(Java Doc)
public String getNextTypeName()(Code)(Java Doc)
public Object getNextTypeObject()(Code)(Java Doc)
public int getPos()(Code)(Java Doc)
public Object getPrevious()(Code)(Java Doc)
public boolean gotoChildrenStart()(Code)(Java Doc)
final public void gotoEnd(AbstractSequence seq)(Code)(Java Doc)
public boolean gotoNext()(Code)(Java Doc)
public boolean gotoPrevious()(Code)(Java Doc)
final public void gotoStart(AbstractSequence seq)(Code)(Java Doc)
final public boolean hasMoreElements()(Code)(Java Doc)
public boolean hasNext()(Code)(Java Doc)
public boolean hasPrevious()(Code)(Java Doc)
public boolean isAfter()(Code)(Java Doc)
public static SeqPosition make(AbstractSequence seq, int ipos)(Code)(Java Doc)
public Object next()(Code)(Java Doc)
final public Object nextElement()(Code)(Java Doc)
public int nextIndex()(Code)(Java Doc)
public Object previous()(Code)(Java Doc)
final public int previousIndex()(Code)(Java Doc)
public void release()(Code)(Java Doc)
public void remove()(Code)(Java Doc)
final public void set(Object value)(Code)(Java Doc)
public void set(AbstractSequence seq, int index, boolean isAfter)(Code)(Java Doc)
public void set(SeqPosition pos)(Code)(Java Doc)
public void setNext(Object value)(Code)(Java Doc)
public void setPos(AbstractSequence seq, int ipos)(Code)(Java Doc)
public void setPos(int ipos)(Code)(Java Doc)
public void setPrevious(Object value)(Code)(Java Doc)
public String toInfo()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.