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

All known Subclasses:   org.jmlspecs.models.JMLObjectToValueMap,
JMLObjectToValueRelation
public class JMLObjectToValueRelation implements JMLCollection(Code)
Binary relations (or set-valued functions) from non-null elements of Object to non-null elements of JMLType . The first type, Object, 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 != 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.1.1.1 $
author:
   Gary T. Leavens
author:
   Clyde Ruby
See Also:   JMLCollection
See Also:   JMLType
See Also:   JMLObjectToValueMap
See Also:   JMLObjectToValueRelationEnumerator
See Also:   JMLObjectToValueRelationImageEnumerator
See Also:   JMLValueSet
See Also:   JMLObjectSet
See Also:   JMLObjectToObjectRelation
See Also:   JMLValueToObjectRelation
See Also:   JMLObjectToValueRelation
See Also:   JMLValueToValueRelation



Field Summary
final public static  JMLObjectToValueRelationEMPTY
     The empty JMLObjectToValueRelation.
final protected static  StringTOO_BIG_TO_UNION
    
final protected  JMLObjectSetdomain_
     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  JMLObjectToValueRelation()
     Initialize this to be an empty relation.
public  JMLObjectToValueRelation(Object dv, JMLType rv)
     Initialize this to be a relation containing a single association between the given domain and range elements.
public  JMLObjectToValueRelation(JMLObjectValuePair pair)
     Initialize this to be a relation containing a single association given by the pair.
protected  JMLObjectToValueRelation(JMLValueSet ipset, JMLObjectSet dom, int sz)
     Initialize this using the given representation.

Method Summary
public  JMLObjectToValueRelationadd(Object 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  JMLObjectToValueRelationEnumeratorassociations()
     Return a enumerator for the set of associations that conceptually make up this relation.
public  Objectclone()
     Return a clone of this object.
public  JMLValueToValueRelationcompose(JMLValueToObjectRelation othRel)
     Return a relation that is the composition of the given relation and this relation.
public  JMLObjectToValueRelationcompose(JMLObjectToObjectRelation othRel)
     Return a relation that is the composition of the given relation and this relation.
public  JMLObjectToValueRelationdifference(JMLObjectToValueRelation othRel)
     Return a relation that is the difference between this and the given relation.
public  JMLObjectSetdomain()
     Returns a set containing the domain of this relation.
public  JMLObjectSetEnumeratordomainElements()
     Return a enumerator for the set that is the domain of this relation.
public  JMLValueSetelementImage(Object dv)
     Returns a set containing all the range elements that this relation relates to the given domain element.
public  JMLObjectToValueRelationEnumeratorelements()
     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(Object dv, JMLType rv)
     Tells whether this associates the given key to the given value.
public  booleanhas(JMLObjectValuePair 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(JMLObjectSet 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  JMLObjectToValueRelationImageEnumeratorimagePairs()
     Return the set of domain image set pairs that make up this relation.
public  JMLObjectToValueRelationinsert(JMLObjectValuePair 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  JMLObjectToValueRelationintersection(JMLObjectToValueRelation othRel)
     Return a relation that is the intersection of this and the given relation.
public  JMLValueToObjectRelationinverse()
     Returns the inverse of this relation.
public  JMLObjectSetinverseElementImage(JMLType rv)
     Return a set of all the domain elements that relate to the given range element.
public  JMLObjectSetinverseImage(JMLValueSet rng)
     Return a set of all the domain elements that relate to some element in the given set of range elements.
public  booleanisDefinedAt(Object 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  JMLObjectToValueRelationremove(Object 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  JMLObjectToValueRelationremove(JMLObjectValuePair pair)
     Return a relation that is just like this relation, except that it does not contain association described by the given pair.
public  JMLObjectToValueRelationremoveFromDomain(Object dv)
     Return a relation that is just like this relation, except that it does not contain any association with the given domain element.
public  JMLObjectToValueRelationrestrictDomainTo(JMLObjectSet dom)
     Return a relation that is like this relation except that its domain is limited to just the elements of the given set.
public  JMLObjectToValueRelationrestrictRangeTo(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  JMLObjectToValueRelationsingleton(Object dv, JMLType rv)
     Return the singleton relation containing the given association.
public static  JMLObjectToValueRelationsingleton(JMLObjectValuePair 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  JMLObjectToValueMaptoFunction()
     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  JMLObjectToValueRelationunion(JMLObjectToValueRelation othRel)
     Return a relation that union of the this and the given relation.

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



TOO_BIG_TO_UNION
final protected static String TOO_BIG_TO_UNION(Code)



domain_
final protected JMLObjectSet 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 JMLObjectValuePairs, 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
JMLObjectToValueRelation
public JMLObjectToValueRelation()(Code)
Initialize this to be an empty relation. That is, the value is an empty set of pairs.
See Also:   JMLObjectToValueRelation.EMPTY



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



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



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




Method Detail
add
public JMLObjectToValueRelation add(Object 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:   JMLObjectToValueRelation.insert



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



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



compose
public JMLValueToValueRelation compose(JMLValueToObjectRelation 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:   JMLObjectToValueRelation.compose(JMLObjectToObjectRelation)



compose
public JMLObjectToValueRelation compose(JMLObjectToObjectRelation 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:   JMLObjectToValueRelation.compose(JMLValueToObjectRelation)



difference
public JMLObjectToValueRelation difference(JMLObjectToValueRelation 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:   JMLObjectToValueRelation.difference
See Also:   JMLObjectToValueRelation.intersection



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



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



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



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



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



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



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



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



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



image
public JMLValueSet image(JMLObjectSet 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:   JMLObjectToValueRelation.elementImage
See Also:   JMLObjectToValueRelation.inverseImage
See Also:   JMLObjectToValueMap.apply



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



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



insert
public JMLObjectToValueRelation insert(JMLObjectValuePair 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:   JMLObjectToValueRelation.add



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



intersection
public JMLObjectToValueRelation intersection(JMLObjectToValueRelation 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:   JMLObjectToValueRelation.difference
See Also:   JMLObjectToValueRelation.union



inverse
public JMLValueToObjectRelation 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:   JMLObjectToValueRelation.inverseImage
See Also:   JMLObjectToValueRelation.inverseElementImage



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



inverseImage
public JMLObjectSet 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:   JMLObjectToValueRelation.inverseElementImage
See Also:   JMLObjectToValueRelation.inverse
See Also:   JMLObjectToValueRelation.image



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



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



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



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



range
public JMLValueSet range()(Code)
Returns a set containing the range of this relation.
See Also:   JMLObjectToValueRelation.rangeElements()
See Also:   JMLObjectToValueRelation.associations()
See Also:   JMLObjectToValueRelation.inverseElementImage
See Also:   JMLObjectToValueRelation.domain()
See Also:   JMLObjectToValueRelation.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:   JMLObjectToValueRelation.range()
See Also:   JMLObjectToValueRelation.domainElements()



remove
public JMLObjectToValueRelation remove(Object 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:   JMLObjectToValueRelation.removeFromDomain
See Also:   JMLObjectToValueRelation.remove(Object,JMLType)
See Also:   JMLObjectToValueRelation.remove(JMLObjectValuePair)



remove
public JMLObjectToValueRelation remove(JMLObjectValuePair 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:   JMLObjectToValueRelation.remove(Object,JMLType)
See Also:   JMLObjectToValueRelation.removeFromDomain



removeFromDomain
public JMLObjectToValueRelation removeFromDomain(Object 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:   JMLObjectToValueRelation.remove(JMLObjectValuePair)
See Also:   JMLObjectToValueRelation.removeFromDomain



restrictDomainTo
public JMLObjectToValueRelation restrictDomainTo(JMLObjectSet 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:   JMLObjectToValueRelation.restrictRangeTo



restrictRangeTo
public JMLObjectToValueRelation 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:   JMLObjectToValueRelation.restrictDomainTo



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



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



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



toFunction
public JMLObjectToValueMap 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:   JMLObjectToValueRelation.isaFunction
See Also:   JMLObjectToValueMap



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



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



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



union
public JMLObjectToValueRelation union(JMLObjectToValueRelation 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:   JMLObjectToValueRelation.difference
See Also:   JMLObjectToValueRelation.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.