Java Doc for LListPosition.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.ExtPosition
         gnu.lists.LListPosition

LListPosition
class LListPosition extends ExtPosition (Code)
LListPosition - a SeqPosition for LLists. Normally, we just use an int pos to indicate a position in a sequence. But for linked lists that would be very inefficient. So this sub-class in addition uses an xpos field to point to the current Pair. However, we do so in a non-obvious way. After a next(), xpos points to *two* Pairs before the logical iterator position (the cursor). This is because of the requirement for remove(), which needs to be able to remove the element *before* the cursor. But to unlink that element, we need to change the 'next' field of the Pair before that again. However, after a call to 'previous', we cannot cheaply move the xpos pointer backwards, so we leave it as is. Therefore, we get the rule that when isAfter() is false the cursor position is after the Pair pointed by xpos; when isAfter() is true then the cursor position is after the Pair ((Pair) xpos).cdr). If the cursor position is too early in the list to satisfy this invariant, then xpos==null.


Field Summary
 Objectxpos
    

Constructor Summary
public  LListPosition(LListPosition old)
    
public  LListPosition(LList seq, int index, boolean isAfter)
    

Method Summary
public  SeqPositioncopy()
    
public  ObjectgetNext()
    
public  PairgetNextPair()
     Get the Pair whose car contains the next element, or null.
public  ObjectgetPrevious()
    
public  PairgetPreviousPair()
     Get the Pair whose car contains the previous element, or null.
public  booleangotoNext()
    
public  booleangotoPrevious()
    
public  booleanhasNext()
    
public  booleanhasPrevious()
    
public  intnextIndex()
    
public  voidset(LList seq, int index, boolean isAfter)
    
public  voidset(AbstractSequence seq, int index, boolean isAfter)
    
public  voidsetNext(Object value)
    
public  voidsetPrevious(Object value)
    
public  StringtoString()
    

Field Detail
xpos
Object xpos(Code)




Constructor Detail
LListPosition
public LListPosition(LListPosition old)(Code)



LListPosition
public LListPosition(LList seq, int index, boolean isAfter)(Code)




Method Detail
copy
public SeqPosition copy()(Code)



getNext
public Object getNext()(Code)



getNextPair
public Pair getNextPair()(Code)
Get the Pair whose car contains the next element, or null.



getPrevious
public Object getPrevious()(Code)



getPreviousPair
public Pair getPreviousPair()(Code)
Get the Pair whose car contains the previous element, or null.



gotoNext
public boolean gotoNext()(Code)



gotoPrevious
public boolean gotoPrevious()(Code)



hasNext
public boolean hasNext()(Code)



hasPrevious
public boolean hasPrevious()(Code)



nextIndex
public int nextIndex()(Code)



set
public void set(LList seq, int index, boolean isAfter)(Code)



set
public void set(AbstractSequence seq, int index, boolean isAfter)(Code)



setNext
public void setNext(Object value)(Code)



setPrevious
public void setPrevious(Object value)(Code)



toString
public String toString()(Code)



Fields inherited from gnu.lists.ExtPosition
int position(Code)(Java Doc)

Methods inherited from gnu.lists.ExtPosition
public int getPos()(Code)(Java Doc)
final public boolean isAfter()(Code)(Java Doc)
public void release()(Code)(Java Doc)
public void setPos(AbstractSequence seq, int ipos)(Code)(Java Doc)

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.