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

All known Subclasses:   org.jmlspecs.models.JMLValueToValueMap,
JMLValueToValueRelation
public class JMLValueToValueRelation implements JMLCollection(Code)
Binary relations (or set-valued functions) from non-null elements of JMLType to non-null elements of JMLType . The first type, JMLType, is called the domain type of the relation; the second type, JMLType, is called the range type of the relation. A relation can be seen as a set of pairs, of form (dv, rv), consisting of an element of the domain type, dv, and an element of the range type, rv. Alternatively, it can be seen as a set-valued function that relates each element of the domain type to some set of elements of the range type (a JMLValueSet ).

This type considers elements val and dv of the domain type, to be distinct just when !val.equals(dv). It considers elements of r and rv of the range type to be distinct just when !r.equals(rv). Cloning takes place for the domain or range elements if the corresponding domain or range type is JMLType .
version:
   $Revision: 1.2 $
author:
   Gary T. Leavens
author:
   Clyde Ruby
See Also:   JMLCollection
See Also:   JMLType
See Also:   JMLValueToValueMap
See Also:   JMLValueToValueRelationEnumerator
See Also:   JMLValueToValueRelationImageEnumerator
See Also:   JMLValueSet
See Also:   JMLObjectSet
See Also:   JMLObjectToObjectRelation
See Also:   JMLValueToObjectRelation
See Also:   JMLObjectToValueRelation
See Also:   JMLValueToValueRelation



Field Summary
final public static  JMLValueToValueRelationEMPTY
     The empty JMLValueToValueRelation.
final protected static  StringTOO_BIG_TO_UNION
    
final protected  JMLValueSetdomain_
     The set of elements in the domain of this relation.
final protected  JMLValueSetimagePairSet_
     The set representing the image pairs in the relation.
final protected  intsize_
     The size (number of pairs) of this relation.

Constructor Summary
public  JMLValueToValueRelation()
     Initialize this to be an empty relation.
public  JMLValueToValueRelation(JMLType dv, JMLType rv)
     Initialize this to be a relation containing a single association between the given domain and range elements.
public  JMLValueToValueRelation(JMLValueValuePair pair)
     Initialize this to be a relation containing a single association given by the pair.
protected  JMLValueToValueRelation(JMLValueSet ipset, JMLValueSet dom, int sz)
     Initialize this using the given representation.

Method Summary
public  JMLValueToValueRelationadd(JMLType dv, JMLType rv)
     Return a relation that is just like this relation, except that it also associates the given domain element to the given range element.
public  JMLValueToValueRelationEnumeratorassociations()
     Return a enumerator for the set of associations that conceptually make up this relation.
public  Objectclone()
     Return a clone of this object.
public  JMLValueToValueRelationcompose(JMLValueToValueRelation othRel)
     Return a relation that is the composition of the given relation and this relation.
public  JMLObjectToValueRelationcompose(JMLObjectToValueRelation othRel)
     Return a relation that is the composition of the given relation and this relation.
public  JMLValueToValueRelationdifference(JMLValueToValueRelation othRel)
     Return a relation that is the difference between this and the given relation.
public  JMLValueSetdomain()
     Returns a set containing the domain of this relation.
public  JMLValueSetEnumeratordomainElements()
     Return a enumerator for the set that is the domain of this relation.
public  JMLValueSetelementImage(JMLType dv)
     Returns a set containing all the range elements that this relation relates to the given domain element.
public  JMLValueToValueRelationEnumeratorelements()
     Return a enumerator for the set of associations that conceptually make up this relation.
public  booleanequals(Object obj)
     Test whether this object's value is equal to the given argument.
public  booleanhas(JMLType dv, JMLType rv)
     Tells whether this associates the given key to the given value.
public  booleanhas(JMLValueValuePair pair)
     Tells whether this associates the given key to the given value.
public  booleanhas(Object obj)
     Tells whether this associates the given key to the given value.
public  inthashCode()
     Return a hash code for this object.
public  JMLValueSetimage(JMLValueSet dom)
     Returns a set containing all the range elements that this relation relates to the elements of the given set of domain elements.
public  JMLValueSetimagePairSet()
     Return the set of image set pairs that make up this relation.
public  JMLValueToValueRelationImageEnumeratorimagePairs()
     Return the set of domain image set pairs that make up this relation.
public  JMLValueToValueRelationinsert(JMLValueValuePair pair)
     Return a relation that is just like this relation, except that it also includes the association described by the given pair.
public  intint_size()
     Return the number of associations in this relation.
public  JMLValueToValueRelationintersection(JMLValueToValueRelation othRel)
     Return a relation that is the intersection of this and the given relation.
public  JMLValueToValueRelationinverse()
     Returns the inverse of this relation.
public  JMLValueSetinverseElementImage(JMLType rv)
     Return a set of all the domain elements that relate to the given range element.
public  JMLValueSetinverseImage(JMLValueSet rng)
     Return a set of all the domain elements that relate to some element in the given set of range elements.
public  booleanisDefinedAt(JMLType dv)
     Tells whether this relation associates any range element to the given domain element.
public  booleanisEmpty()
     Tells whether the relation is empty.
public  booleanisaFunction()
     Tells whether this relation is a function.
public  JMLIteratoriterator()
     Returns an Iterator over the set of pairs conceptually contained in this relation..
public  JMLValueSetrange()
     Returns a set containing the range of this relation.
public  JMLValueSetEnumeratorrangeElements()
     Return a enumerator for the set that is the range of this relation.
public  JMLValueToValueRelationremove(JMLType dv, JMLType rv)
     Return a relation that is just like this relation, except that it does not contain the association, if any, between the given domain and range elements.
public  JMLValueToValueRelationremove(JMLValueValuePair pair)
     Return a relation that is just like this relation, except that it does not contain association described by the given pair.
public  JMLValueToValueRelationremoveFromDomain(JMLType dv)
     Return a relation that is just like this relation, except that it does not contain any association with the given domain element.
public  JMLValueToValueRelationrestrictDomainTo(JMLValueSet dom)
     Return a relation that is like this relation except that its domain is limited to just the elements of the given set.
public  JMLValueToValueRelationrestrictRangeTo(JMLValueSet rng)
     Return a relation that is like this relation except that its range is limited to just the elements of the given set.
public static  JMLValueToValueRelationsingleton(JMLType dv, JMLType rv)
     Return the singleton relation containing the given association.
public static  JMLValueToValueRelationsingleton(JMLValueValuePair pair)
     Return the singleton relation containing the association described by the given pair.
public  JMLValueBagtoBag()
     Return the bag of all associations in this relation.
public  JMLValueToValueMaptoFunction()
     Return a map that is contained in this relation.
public  JMLValueSequencetoSequence()
     Return a sequence containing all associations in this relation.
public  JMLValueSettoSet()
     Return the set of all associations in this relation.
public  StringtoString()
     Return a string representation of this object.
public  JMLValueToValueRelationunion(JMLValueToValueRelation othRel)
     Return a relation that union of the this and the given relation.

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



TOO_BIG_TO_UNION
final protected static String TOO_BIG_TO_UNION(Code)



domain_
final protected JMLValueSet domain_(Code)
The set of elements in the domain of this relation.



imagePairSet_
final protected JMLValueSet imagePairSet_(Code)
The set representing the image pairs in the relation. The elements of this set are JMLValueValuePairs, which are all non-null. Each such pair has a key which is an element in domain_ and a value which is a JMLValueSet containing all of the elements that the key of the pair is related to.



size_
final protected int size_(Code)
The size (number of pairs) of this relation.




Constructor Detail
JMLValueToValueRelation
public JMLValueToValueRelation()(Code)
Initialize this to be an empty relation. That is, the value is an empty set of pairs.
See Also:   JMLValueToValueRelation.EMPTY



JMLValueToValueRelation
public JMLValueToValueRelation(JMLType dv, JMLType rv)(Code)
Initialize this to be a relation containing a single association between the given domain and range elements.
See Also:   JMLValueToValueRelation.singleton(JMLType,JMLType)
See Also:   JMLValueToValueRelation.JMLValueToValueRelation(JMLValueValuePair)



JMLValueToValueRelation
public JMLValueToValueRelation(JMLValueValuePair pair)(Code)
Initialize this to be a relation containing a single association given by the pair.
See Also:   JMLValueToValueRelation.singleton(JMLValueValuePair)
See Also:   JMLValueToValueRelation.JMLValueToValueRelation(JMLType,JMLType)



JMLValueToValueRelation
protected JMLValueToValueRelation(JMLValueSet ipset, JMLValueSet dom, int sz)(Code)
Initialize this using the given representation.




Method Detail
add
public JMLValueToValueRelation add(JMLType dv, JMLType rv) throws NullPointerException, IllegalStateException(Code)
Return a relation that is just like this relation, except that it also associates the given domain element to the given range element.
See Also:   JMLValueToValueRelation.insert



associations
public JMLValueToValueRelationEnumerator associations()(Code)
Return a enumerator for the set of associations that conceptually make up this relation.
See Also:   JMLValueToValueRelation.elements()
See Also:   JMLValueToValueRelation.iterator()
See Also:   JMLValueToValueRelation.toSet()
See Also:   JMLValueToValueRelation.imagePairs()



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



compose
public JMLValueToValueRelation compose(JMLValueToValueRelation othRel)(Code)
Return a relation that is the composition of the given relation and this relation. The composition is done in the "usual" order, so that if the given relation relates x to y, and this relation relates y to z, then the result relates x to z.
See Also:   JMLValueToValueRelation.compose(JMLObjectToValueRelation)



compose
public JMLObjectToValueRelation compose(JMLObjectToValueRelation othRel)(Code)
Return a relation that is the composition of the given relation and this relation. The composition is done in the "usual" order, so that if the given relation relates x to y, and this relation relates y to z, then the result relates x to z.
See Also:   JMLValueToValueRelation.compose(JMLValueToValueRelation)



difference
public JMLValueToValueRelation difference(JMLValueToValueRelation othRel)(Code)
Return a relation that is the difference between this and the given relation. This is the difference between the sets of associations.
See Also:   JMLValueToValueRelation.difference
See Also:   JMLValueToValueRelation.intersection



domain
public JMLValueSet domain()(Code)
Returns a set containing the domain of this relation.
See Also:   JMLValueToValueRelation.domainElements()
See Also:   JMLValueToValueRelation.associations()
See Also:   JMLValueToValueRelation.isDefinedAt
See Also:   JMLValueToValueRelation.image
See Also:   JMLValueToValueRelation.range()
See Also:   JMLValueToValueRelation.inverse()



domainElements
public JMLValueSetEnumerator domainElements()(Code)
Return a enumerator for the set that is the domain of this relation.
See Also:   JMLValueToValueRelation.domain()
See Also:   JMLValueToValueRelation.rangeElements()



elementImage
public JMLValueSet elementImage(JMLType dv)(Code)
Returns a set containing all the range elements that this relation relates to the given domain element.
See Also:   JMLValueToValueRelation.image
See Also:   JMLValueToValueMap.apply



elements
public JMLValueToValueRelationEnumerator elements()(Code)
Return a enumerator for the set of associations that conceptually make up this relation. This is a synonym for associations.
See Also:   JMLValueToValueRelation.associations()
See Also:   JMLValueToValueRelation.iterator()



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



has
public boolean has(JMLType dv, JMLType rv)(Code)
Tells whether this associates the given key to the given value.
See Also:   JMLValueToValueRelation.isDefinedAt
See Also:   JMLValueToValueRelation.has(JMLValueValuePair)



has
public boolean has(JMLValueValuePair pair)(Code)
Tells whether this associates the given key to the given value.
See Also:   JMLValueToValueRelation.isDefinedAt
See Also:   JMLValueToValueRelation.has(JMLType,JMLType)



has
public boolean has(Object obj)(Code)
Tells whether this associates the given key to the given value.
See Also:   JMLValueToValueRelation.isDefinedAt
See Also:   JMLValueToValueRelation.has(JMLValueValuePair)



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



image
public JMLValueSet image(JMLValueSet dom)(Code)
Returns a set containing all the range elements that this relation relates to the elements of the given set of domain elements.
See Also:   JMLValueToValueRelation.elementImage
See Also:   JMLValueToValueRelation.inverseImage
See Also:   JMLValueToValueMap.apply



imagePairSet
public JMLValueSet imagePairSet()(Code)
Return the set of image set pairs that make up this relation.
See Also:   JMLValueToValueRelation.imagePairs()
See Also:   JMLValueToValueRelation.toSet()



imagePairs
public JMLValueToValueRelationImageEnumerator imagePairs()(Code)
Return the set of domain image set pairs that make up this relation.
See Also:   JMLValueToValueRelation.imagePairSet()
See Also:   JMLValueToValueRelation.associations()
See Also:   JMLValueToValueRelation.toSet()



insert
public JMLValueToValueRelation insert(JMLValueValuePair pair) throws IllegalStateException(Code)
Return a relation that is just like this relation, except that it also includes the association described by the given pair.
See Also:   JMLValueToValueRelation.add



int_size
public int int_size()(Code)
Return the number of associations in this relation.



intersection
public JMLValueToValueRelation intersection(JMLValueToValueRelation othRel)(Code)
Return a relation that is the intersection of this and the given relation. This is the intersection of the sets of associations.
See Also:   JMLValueToValueRelation.difference
See Also:   JMLValueToValueRelation.union



inverse
public JMLValueToValueRelation inverse()(Code)
Returns the inverse of this relation. The inverse is the relation that relates each range element to the corresponding domain element.
See Also:   JMLValueToValueRelation.inverseImage
See Also:   JMLValueToValueRelation.inverseElementImage



inverseElementImage
public JMLValueSet inverseElementImage(JMLType rv)(Code)
Return a set of all the domain elements that relate to the given range element.
See Also:   JMLValueToValueRelation.inverseImage
See Also:   JMLValueToValueRelation.inverse
See Also:   JMLValueToValueRelation.elementImage



inverseImage
public JMLValueSet inverseImage(JMLValueSet rng)(Code)
Return a set of all the domain elements that relate to some element in the given set of range elements.
See Also:   JMLValueToValueRelation.inverseElementImage
See Also:   JMLValueToValueRelation.inverse
See Also:   JMLValueToValueRelation.image



isDefinedAt
public boolean isDefinedAt(JMLType dv)(Code)
Tells whether this relation associates any range element to the given domain element.
See Also:   JMLValueToValueRelation.domain()



isEmpty
public boolean isEmpty()(Code)
Tells whether the relation is empty.
See Also:   JMLValueToValueRelation.int_size()



isaFunction
public boolean isaFunction()(Code)
Tells whether this relation is a function.
See Also:   JMLValueToValueMap



iterator
public JMLIterator iterator()(Code)
Returns an Iterator over the set of pairs conceptually contained in this relation..
See Also:   JMLValueToValueRelation.associations()
See Also:   JMLValueToValueRelation.elements()



range
public JMLValueSet range()(Code)
Returns a set containing the range of this relation.
See Also:   JMLValueToValueRelation.rangeElements()
See Also:   JMLValueToValueRelation.associations()
See Also:   JMLValueToValueRelation.inverseElementImage
See Also:   JMLValueToValueRelation.domain()
See Also:   JMLValueToValueRelation.inverse()



rangeElements
public JMLValueSetEnumerator rangeElements()(Code)
Return a enumerator for the set that is the range of this relation. (This was formerly called "elements").
See Also:   JMLValueToValueRelation.range()
See Also:   JMLValueToValueRelation.domainElements()



remove
public JMLValueToValueRelation remove(JMLType dv, JMLType rv)(Code)
Return a relation that is just like this relation, except that it does not contain the association, if any, between the given domain and range elements.
See Also:   JMLValueToValueRelation.removeFromDomain
See Also:   JMLValueToValueRelation.remove(JMLType,JMLType)
See Also:   JMLValueToValueRelation.remove(JMLValueValuePair)



remove
public JMLValueToValueRelation remove(JMLValueValuePair pair)(Code)
Return a relation that is just like this relation, except that it does not contain association described by the given pair.
See Also:   JMLValueToValueRelation.remove(JMLType,JMLType)
See Also:   JMLValueToValueRelation.removeFromDomain



removeFromDomain
public JMLValueToValueRelation removeFromDomain(JMLType dv)(Code)
Return a relation that is just like this relation, except that it does not contain any association with the given domain element.
See Also:   JMLValueToValueRelation.remove(JMLValueValuePair)
See Also:   JMLValueToValueRelation.removeFromDomain



restrictDomainTo
public JMLValueToValueRelation restrictDomainTo(JMLValueSet dom)(Code)
Return a relation that is like this relation except that its domain is limited to just the elements of the given set.
See Also:   JMLValueToValueRelation.restrictRangeTo



restrictRangeTo
public JMLValueToValueRelation restrictRangeTo(JMLValueSet rng)(Code)
Return a relation that is like this relation except that its range is limited to just the elements of the given set.
See Also:   JMLValueToValueRelation.restrictDomainTo



singleton
public static JMLValueToValueRelation singleton(JMLType dv, JMLType rv)(Code)
Return the singleton relation containing the given association.
See Also:   JMLValueToValueRelation.singleton(JMLValueValuePair)
See Also:   JMLValueToValueRelation.JMLValueToValueRelation(JMLType,JMLType)



singleton
public static JMLValueToValueRelation singleton(JMLValueValuePair pair)(Code)
Return the singleton relation containing the association described by the given pair.
See Also:   JMLValueToValueRelation.singleton(JMLType,JMLType)
See Also:   JMLValueToValueRelation.JMLValueToValueRelation(JMLValueValuePair)



toBag
public JMLValueBag toBag()(Code)
Return the bag of all associations in this relation.
See Also:   JMLValueToValueRelation.toSet()
See Also:   JMLValueToValueRelation.toSequence()



toFunction
public JMLValueToValueMap toFunction()(Code)
Return a map that is contained in this relation. If this relation is a function, then this method can be seen as a type conversion which does not make a change to the abstract value. However, if this relation is not a function, then this method chooses a function contained in this relation from among the possibilities available.
See Also:   JMLValueToValueRelation.isaFunction
See Also:   JMLValueToValueMap



toSequence
public JMLValueSequence toSequence()(Code)
Return a sequence containing all associations in this relation.
See Also:   JMLValueToValueRelation.toSet()
See Also:   JMLValueToValueRelation.toBag()



toSet
public JMLValueSet toSet()(Code)
Return the set of all associations in this relation.
See Also:   JMLValueToValueRelation.associations()
See Also:   JMLValueToValueRelation.toBag()
See Also:   JMLValueToValueRelation.toSequence()



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



union
public JMLValueToValueRelation union(JMLValueToValueRelation othRel) throws IllegalStateException(Code)
Return a relation that union of the this and the given relation. This is the union of the sets of associations.
See Also:   JMLValueToValueRelation.difference
See Also:   JMLValueToValueRelation.intersection



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.