Java Doc for JMLListObjectNode.java in  » Testing » KeY » org » jmlspecs » models » 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 » KeY » org.jmlspecs.models 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jmlspecs.models.JMLListObjectNode

JMLListObjectNode
class JMLListObjectNode implements JMLType(Code)
An implementation class used in various models. These are singly-linked list nodes containing objects. The empty list is represented by null, which makes dealing with these lists tricky. Normal users should use JMLObjectSequence instead of this type to avoid these difficulties.

This type uses "==" to compare elements. The cons method does not clone elements that are passed into the list.
version:
   $Revision: 1.3 $
author:
   Gary T. Leavens
author:
   Albert L. Baker
See Also:   JMLObjectSequence
See Also:   JMLObjectBag
See Also:   JMLObjectSet



Field Summary
final public  JMLListObjectNodenext
     The next node in this list.
final public  Objectval
     The data contained in this list node.

Constructor Summary
public  JMLListObjectNode(Object item, JMLListObjectNode nxt)
     Initialize this list to have the given item as its first element followed by the given list.

Method Summary
public  JMLListObjectNodeappend(Object item)
     Return a list that consists of this list and the given element.
public  Objectclone()
     Return a clone of this object.
public  JMLListObjectNodeconcat(JMLListObjectNode ls2)
     Return a list that is the concatenation of this with the given lists.
Parameters:
  ls2 - the list to place at the end of this list in theresult.
public static  JMLListObjectNodecons(Object hd, JMLListObjectNode tl)
     Return a JMLListObjectNode containing the given element followed by the given list. Note that cons() adds elements to the front of a list.
public  booleanequals(Object ls2)
     Test whether this object's value is equal to the given argument.
public  ObjectgetItem(Object item)
     Return the zero-based index of the first occurrence of the given element in the list, if there is one
Parameters:
  item - the Object sought in this list.
public  booleanhas(Object item)
     Tells whether the given element is "==" to an element in the list.
public  inthashCode()
     Return a hash code for this object.
public  Objecthead()
     Return the first element in this list.
public  booleanheadEquals(Object item)
     Tell if the head of the list is "==" to the given item.
public  intindexOf(Object item)
     Return the zero-based index of the first occurrence of the given element in the list, if there is one
Parameters:
  item - the Object sought in this.
public  JMLListObjectNodeinsertBefore(int n, Object item)
     Return a list that is like this list but with the given item inserted before the given index.
public  intint_length()
     Tells the number of elements in the list; a synonym for size.
public  intint_size()
     Tells the number of elements in the list; a synonym for length.
public  booleanisPrefixOf(JMLListObjectNode ls2)
     Tells whether the elements of this list occur, in order, at the beginning of the given list, using "==" for comparisons.
public  ObjectitemAt(int i)
     Return the ith element of a list.
public  Objectlast()
     Return the last element in this list.
public  JMLListObjectNodeprefix(int n)
     Return a list containing the first n elements in this list.
Parameters:
  n - the number of elements to leave in the result.
public  JMLListObjectNodeprepend(Object item)
     Return a list that is like this, but with the given item at the front.
public  JMLListObjectNoderemove(Object item)
     Return a list that is like this list but without the first occurrence of the given item.
public  JMLListObjectNoderemoveItemAt(int n)
     Return a list like this list, but without the element at the given zero-based index.
Parameters:
  n - the zero-based index into the list.
public  JMLListObjectNoderemoveLast()
     Return a list containing all but the last element in this.
public  JMLListObjectNoderemovePrefix(int n)
     Return a list containing all but the first n elements in this list.
public  JMLListObjectNodereplaceItemAt(int n, Object item)
     Return a list like this, but with item replacing the element at the given zero-based index.
public  JMLListObjectNodereverse()
     Return a list that is the reverse of this list.
public  StringtoString()
     Return a string representation for this list.

Field Detail
next
final public JMLListObjectNode next(Code)
The next node in this list.



val
final public Object val(Code)
The data contained in this list node.




Constructor Detail
JMLListObjectNode
public JMLListObjectNode(Object item, JMLListObjectNode nxt)(Code)
Initialize this list to have the given item as its first element followed by the given list. This does not do any cloning.
Parameters:
  item - the object to place at the head of this list.
Parameters:
  nxt - the _JMLListObjectNode to make the tail of this list.




Method Detail
append
public JMLListObjectNode append(Object item)(Code)
Return a list that consists of this list and the given element.



clone
public Object clone()(Code)
Return a clone of this object.



concat
public JMLListObjectNode concat(JMLListObjectNode ls2)(Code)
Return a list that is the concatenation of this with the given lists.
Parameters:
  ls2 - the list to place at the end of this list in theresult. the concatenation of this list and ls2.



cons
public static JMLListObjectNode cons(Object hd, JMLListObjectNode tl)(Code)
Return a JMLListObjectNode containing the given element followed by the given list. Note that cons() adds elements to the front of a list. It handles any necessary cloning for value lists and it handles inserting null elements.
Parameters:
  hd - the object to place at the head of the result.
Parameters:
  tl - the JMLListObjectNode to make the tail of the result.



equals
public boolean equals(Object ls2)(Code)
Test whether this object's value is equal to the given argument.



getItem
public Object getItem(Object item) throws JMLListException(Code)
Return the zero-based index of the first occurrence of the given element in the list, if there is one
Parameters:
  item - the Object sought in this list. the first zero-based index at which item occurs.
exception:
  JMLListException - if the item does not occur in this list.
See Also:   JMLListObjectNode.itemAt(int)



has
public boolean has(Object item)(Code)
Tells whether the given element is "==" to an element in the list.



hashCode
public int hashCode()(Code)
Return a hash code for this object.



head
public Object head()(Code)
Return the first element in this list. Note that head() handles any cloning necessary for value lists.



headEquals
public boolean headEquals(Object item)(Code)
Tell if the head of the list is "==" to the given item.
See Also:   JMLListObjectNode.has(Object)



indexOf
public int indexOf(Object item)(Code)
Return the zero-based index of the first occurrence of the given element in the list, if there is one
Parameters:
  item - the Object sought in this. the first index at which item occurs or -1 if it does not.



insertBefore
public JMLListObjectNode insertBefore(int n, Object item) throws JMLListException(Code)
Return a list that is like this list but with the given item inserted before the given index.



int_length
public int int_length()(Code)
Tells the number of elements in the list; a synonym for size.



int_size
public int int_size()(Code)
Tells the number of elements in the list; a synonym for length.



isPrefixOf
public boolean isPrefixOf(JMLListObjectNode ls2)(Code)
Tells whether the elements of this list occur, in order, at the beginning of the given list, using "==" for comparisons.



itemAt
public Object itemAt(int i) throws JMLListException(Code)
Return the ith element of a list.
See Also:   JMLListObjectNode.getItem(int)



last
public Object last()(Code)
Return the last element in this list.



prefix
public JMLListObjectNode prefix(int n)(Code)
Return a list containing the first n elements in this list.
Parameters:
  n - the number of elements to leave in the result. null if n is not positive or greater than the length of this list.



prepend
public JMLListObjectNode prepend(Object item)(Code)
Return a list that is like this, but with the given item at the front. Note that this clones the item if necessary.
Parameters:
  item - the element to place at the front of the result.



remove
public JMLListObjectNode remove(Object item)(Code)
Return a list that is like this list but without the first occurrence of the given item.



removeItemAt
public JMLListObjectNode removeItemAt(int n)(Code)
Return a list like this list, but without the element at the given zero-based index.
Parameters:
  n - the zero-based index into the list. null if the index is out of range or if the list was of size 1.



removeLast
public JMLListObjectNode removeLast()(Code)
Return a list containing all but the last element in this.



removePrefix
public JMLListObjectNode removePrefix(int n)(Code)
Return a list containing all but the first n elements in this list.
Parameters:
  n - the number of elements to remove null if n is negative or greater than the length of this list.



replaceItemAt
public JMLListObjectNode replaceItemAt(int n, Object item)(Code)
Return a list like this, but with item replacing the element at the given zero-based index.
Parameters:
  n - the zero-based index into this list.
Parameters:
  item - the item to put at index index



reverse
public JMLListObjectNode reverse()(Code)
Return a list that is the reverse of this list.



toString
public String toString()(Code)
Return a string representation for this list. The output is ML style.



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify() throws IllegalMonitorStateException(Code)(Java Doc)
final public void notifyAll() throws IllegalMonitorStateException(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait() throws IllegalMonitorStateException, InterruptedException(Code)(Java Doc)
final public void wait(long ms) throws IllegalMonitorStateException, InterruptedException(Code)(Java Doc)
final public void wait(long ms, int ns) throws IllegalMonitorStateException, 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.