Java Doc for JMLEqualsSet.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.JMLEqualsSet

JMLEqualsSet
public class JMLEqualsSet implements JMLCollection(Code)
Sets of objects. This type uses ".equals" to compare elements, and does not clone elements that are passed into and returned from the set's methods.

For the purposes of informal specification in the methods below, we assume there is a model field

public model mathematical_set theSet;
that you can think of as a mathematical set of objects.
version:
   $Revision: 1.2 $
author:
   Gary T. Leavens, with help from Albert Baker, Clyde Ruby,
author:
   and others.
See Also:   JMLCollection
See Also:   JMLType
See Also:   JMLObjectSet
See Also:   JMLValueSet
See Also:   JMLEqualsSetEnumerator
See Also:   JMLObjectBag
See Also:   JMLEqualsBag
See Also:   JMLValueBag


Field Summary
final public static  JMLEqualsSetEMPTY
     The empty JMLEqualsSet.
final protected  intsize
     The number of elements in this set.
final protected  JMLListEqualsNodethe_list
     The list representing the elements of this set.

Constructor Summary
public  JMLEqualsSet()
     Initialize this to be an empty set.
public  JMLEqualsSet(Object e)
     Initialize this to be a singleton set containing the given element.
protected  JMLEqualsSet(JMLListEqualsNode ls, int sz)
     Initialize this set with the given instance variables.
protected  JMLEqualsSet(JMLListEqualsNode ls)
     Initialize this set with the given list.

Method Summary
public  Objectchoose()
     Return an arbitrary element of this.
public  Objectclone()
     Return a clone of this object.
public  booleancontainsAll(java.util.Collection c)
     Tell whether, for each element in the given collection, there is a ".equals" element in this set.
public static  JMLEqualsSetconvertFrom(Object[] a)
     Return the set containing all the elements in the given array.
public static  JMLEqualsSetconvertFrom(java.util.Collection c)
     Return the set containing all the object in the given collection.
public static  JMLEqualsSetconvertFrom(JMLCollection c)
     Return the set containing all the object in the given JMLCollection.
public  JMLEqualsSetdifference(JMLEqualsSet s2)
     Returns a new set that contains all the elements that are in this but not in the given argument.
public  JMLEqualsSetEnumeratorelements()
     Returns an Enumeration over this set.
public  booleanequals(Object s2)
    
protected  JMLEqualsSetfast_insert(Object elem)
     Returns a new set that contains all the elements of this and also the given argument, assuming the argument is not in the set.
public  booleanhas(Object elem)
     Is the argument ".equals" to one of the objects in theSet.
public  inthashCode()
     Return a hash code for this object.
public  JMLEqualsSetinsert(Object elem)
     Returns a new set that contains all the elements of this and also the given argument.
public  intint_size()
     Tells the number of elements in the set.
public  JMLEqualsSetintersection(JMLEqualsSet s2)
     Returns a new set that contains all the elements that are in both this and the given argument.
public  booleanisEmpty()
     Is the set empty.
public  booleanisProperSubset(JMLEqualsSet s2)
     Tells whether this set is a subset of but not equal to the argument.
public  booleanisProperSuperset(JMLEqualsSet s2)
     Tells whether this set is a superset of but not equal to the argument.
public  booleanisSubset(JMLEqualsSet s2)
     Tells whether this set is a subset of or equal to the argument.
public  booleanisSuperset(JMLEqualsSet s2)
     Tells whether this set is a superset of or equal to the argument.
public  JMLIteratoriterator()
     Returns an Iterator over this set.
public  JMLEqualsSetpowerSet()
     Returns a new set that is the set of all subsets of this.
public  JMLEqualsSetremove(Object elem)
     Returns a new set that contains all the elements of this except for the given argument.
public static  JMLEqualsSetsingleton(Object e)
     Return the singleton set containing the given element.
public  Object[]toArray()
     Return a new array containing all the elements of this.
public  JMLEqualsBagtoBag()
     Return a new JMLEqualsBag containing all the elements of this.
public  JMLEqualsSequencetoSequence()
     Return a new JMLEqualsSequence containing all the elements of this.
public  StringtoString()
     Return a string representation of this object.
public  JMLEqualsSetunion(JMLEqualsSet s2)
     Returns a new set that contains all the elements that are in either this or the given argument.

Field Detail
EMPTY
final public static JMLEqualsSet EMPTY(Code)
The empty JMLEqualsSet.
See Also:   JMLEqualsSet.JMLEqualsSet()



size
final protected int size(Code)
The number of elements in this set.



the_list
final protected JMLListEqualsNode the_list(Code)
The list representing the elements of this set.




Constructor Detail
JMLEqualsSet
public JMLEqualsSet()(Code)
Initialize this to be an empty set.
See Also:   JMLEqualsSet.EMPTY



JMLEqualsSet
public JMLEqualsSet(Object e)(Code)
Initialize this to be a singleton set containing the given element.
See Also:   JMLEqualsSet.singleton



JMLEqualsSet
protected JMLEqualsSet(JMLListEqualsNode ls, int sz)(Code)
Initialize this set with the given instance variables.



JMLEqualsSet
protected JMLEqualsSet(JMLListEqualsNode ls)(Code)
Initialize this set with the given list.




Method Detail
choose
public Object choose() throws JMLNoSuchElementException(Code)
Return an arbitrary element of this.
exception:
  JMLNoSuchElementException - if this is empty.
See Also:   JMLEqualsSet.isEmpty()
See Also:   JMLEqualsSet.elements()



clone
public Object clone()(Code)
Return a clone of this object. This method does not clone the elements of the set.



containsAll
public boolean containsAll(java.util.Collection c)(Code)
Tell whether, for each element in the given collection, there is a ".equals" element in this set.
Parameters:
  c - the collection whose elements are sought.
See Also:   JMLEqualsSet.isSuperset(JMLEqualsSet)
See Also:   JMLEqualsSet.convertFrom(java.util.Collection)



convertFrom
public static JMLEqualsSet convertFrom(Object[] a)(Code)
Return the set containing all the elements in the given array.



convertFrom
public static JMLEqualsSet convertFrom(java.util.Collection c) throws ClassCastException(Code)
Return the set containing all the object in the given collection.
throws:
  ClassCastException - if some element in c is not an instance of Object.
See Also:   JMLEqualsSet.containsAll(java.util.Collection)



convertFrom
public static JMLEqualsSet convertFrom(JMLCollection c) throws ClassCastException(Code)
Return the set containing all the object in the given JMLCollection.
throws:
  ClassCastException - if some element in c is not an instance of Object.



difference
public JMLEqualsSet difference(JMLEqualsSet s2)(Code)
Returns a new set that contains all the elements that are in this but not in the given argument.
See Also:   JMLEqualsSet.union(JMLEqualsSet)
See Also:   JMLEqualsSet.difference(JMLEqualsSet)



elements
public JMLEqualsSetEnumerator elements()(Code)
Returns an Enumeration over this set.
See Also:   JMLEqualsSet.iterator()



equals
public boolean equals(Object s2)(Code)



fast_insert
protected JMLEqualsSet fast_insert(Object elem)(Code)
Returns a new set that contains all the elements of this and also the given argument, assuming the argument is not in the set.
See Also:   JMLEqualsSet.insert(Object)



has
public boolean has(Object elem)(Code)
Is the argument ".equals" to one of the objects in theSet.



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



insert
public JMLEqualsSet insert(Object elem) throws IllegalStateException(Code)
Returns a new set that contains all the elements of this and also the given argument.
See Also:   JMLEqualsSet.has(Object)
See Also:   JMLEqualsSet.remove(Object)



int_size
public int int_size()(Code)
Tells the number of elements in the set.



intersection
public JMLEqualsSet intersection(JMLEqualsSet s2)(Code)
Returns a new set that contains all the elements that are in both this and the given argument.
See Also:   JMLEqualsSet.union(JMLEqualsSet)
See Also:   JMLEqualsSet.difference(JMLEqualsSet)



isEmpty
public boolean isEmpty()(Code)
Is the set empty.
See Also:   JMLEqualsSet.int_size()
See Also:   JMLEqualsSet.has(Object)



isProperSubset
public boolean isProperSubset(JMLEqualsSet s2)(Code)
Tells whether this set is a subset of but not equal to the argument.
See Also:   JMLEqualsSet.isSubset(JMLEqualsSet)
See Also:   JMLEqualsSet.isProperSuperset(JMLEqualsSet)



isProperSuperset
public boolean isProperSuperset(JMLEqualsSet s2)(Code)
Tells whether this set is a superset of but not equal to the argument.
See Also:   JMLEqualsSet.isSuperset(JMLEqualsSet)
See Also:   JMLEqualsSet.isProperSubset(JMLEqualsSet)



isSubset
public boolean isSubset(JMLEqualsSet s2)(Code)
Tells whether this set is a subset of or equal to the argument.
See Also:   JMLEqualsSet.isProperSubset(JMLEqualsSet)
See Also:   JMLEqualsSet.isSuperset(JMLEqualsSet)



isSuperset
public boolean isSuperset(JMLEqualsSet s2)(Code)
Tells whether this set is a superset of or equal to the argument.
See Also:   JMLEqualsSet.isProperSuperset(JMLEqualsSet)
See Also:   JMLEqualsSet.isSubset(JMLEqualsSet)
See Also:   JMLEqualsSet.containsAll(java.util.Collection)



iterator
public JMLIterator iterator()(Code)
Returns an Iterator over this set.
See Also:   JMLEqualsSet.elements()



powerSet
public JMLEqualsSet powerSet() throws IllegalStateException(Code)
Returns a new set that is the set of all subsets of this.



remove
public JMLEqualsSet remove(Object elem)(Code)
Returns a new set that contains all the elements of this except for the given argument.
See Also:   JMLEqualsSet.has(Object)
See Also:   JMLEqualsSet.insert(Object)



singleton
public static JMLEqualsSet singleton(Object e)(Code)
Return the singleton set containing the given element.
See Also:   JMLEqualsSet.JMLEqualsSet(Object)



toArray
public Object[] toArray()(Code)
Return a new array containing all the elements of this.
See Also:   JMLEqualsSet.toSequence()



toBag
public JMLEqualsBag toBag()(Code)
Return a new JMLEqualsBag containing all the elements of this.
See Also:   JMLEqualsSet.toSequence()



toSequence
public JMLEqualsSequence toSequence()(Code)
Return a new JMLEqualsSequence containing all the elements of this.
See Also:   JMLEqualsSet.toBag()
See Also:   JMLEqualsSet.toArray()



toString
public String toString()(Code)
Return a string representation of this object.



union
public JMLEqualsSet union(JMLEqualsSet s2) throws IllegalStateException(Code)
Returns a new set that contains all the elements that are in either this or the given argument.
See Also:   JMLEqualsSet.intersection(JMLEqualsSet)
See Also:   JMLEqualsSet.difference(JMLEqualsSet)



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.