Java Doc for OCLCollections.java in  » UML » AndroMDA-3.2 » org » andromda » translation » ocl » validation » 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 » UML » AndroMDA 3.2 » org.andromda.translation.ocl.validation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.andromda.translation.ocl.validation.OCLCollections

OCLCollections
final public class OCLCollections (Code)
Used to translated OCL collection expressions to their corresponding Java collection expressions.




Method Summary
public static  Objectany(Collection collection, Predicate predicate)
     Returns a random element from the collection for which the argument expression evaluates true.
public static  booleanappend(List list, Object item)
     Appends the item to the list.
public static  booleanappend(Bag collection, Object item)
     Appends the item to the bag.
public static  BagasBag(Collection collection)
     Returns the argument as a bag.
public static  SetasOrderedSet(Collection collection)
     Returns the argument as an ordered set.
public static  ListasSequence(Collection collection)
     Returns the argument as a list.
public static  SetasSet(Collection collection)
     Returns the argument as a set.
public static  Objectat(List list, int index)
     Returns the element at the specified index in the argument list.
public static  Collectioncollect(Collection collection, Transformer transformer)
     Returns the collection of Objects that results from executing the transformer on each individual element in the source collection.
public static  CollectioncollectNested(Collection collection)
    
public static  intcount(Collection collection, Object item)
     Counts the number of occurrences of the argument item in the source collection.
public static  booleanexcludes(Collection collection, Object item)
     Return true if the object is not an element of the collection, false otherwise.
public static  booleanexcludesAll(Collection collection, Collection items)
     Returns true if all elements of the parameter collection are not present in the current collection, false otherwise.
public static  booleanexcluding(Collection collection, Object item)
     Removes all occurrences of the item in the source collection.
public static  booleanexists(Collection collection, Predicate predicate)
     Returns true if a predicate is true for at least one element of a collection.
public static  booleanexists(Object collection, Predicate predicate)
     Returns true if a predicate is true for at least one element of a collection.
public static  Objectfirst(Object object)
     Returns the first element in the collection.
Parameters:
  object - the collection or single instance which will be converted to a collection.
public static  Collectionflatten(Collection collection)
     Recursively flattens this collection, this method returns a Collection containing no nested Collection instances.
public static  booleanforAll(Collection collection, Predicate predicate)
    

Executes every predicate for the given collectoin, if one evaluates to false this operation returns false, otherwise true is returned.

public static  booleanforAll(Object collection, Predicate predicate)
    

Executes every predicate for the given collection, if one evaluates to false this operation returns false, otherwise true is returned.

public static  booleanincludes(Collection collection, Object item)
     Returns true if the object is an element of the collection, false otherwise.
public static  booleanincludesAll(Collection collection, Collection items)
     Returns true if all elements of the parameter collection are present in the current collection, false otherwise.
public static  booleanincluding(Collection collection, Object item)
    
public static  intindexOf(List collection, Object item)
     Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
public static  voidinsertAt(List collection, int index, Object item)
     Insert the item at the specified index into the collection.
public static  Collectionintersection(Collection first, Collection second)
     Returns the collection of elements common in both argument collections.
public static  booleanisEmpty(Collection collection)
     Returns true if the collection contains no elements, false otherwise.
public static  booleanisEmpty(Object object)
     Returns true if the argument is null, false otherwise.
public static  booleanisEmpty(String string)
     Returns true if the argument is either null or only contains whitespace characters, false otherwise.
public static  booleanisUnique(Collection collection, Transformer transformer)
     Returns true if the result of executing the transformer has a unique value for each element in the source collection.
public static  booleanisUnique(Object collection, Transformer transformer)
     Returns true if the result of executing the transformer has a unique value for each element in the source collection.
public static  Collectioniterate(Collection collection)
    
public static  Objectlast(Object object)
     Returns the last element in the collection.
Parameters:
  object - the collection or single instance which will be converted to a collection.
public static  booleannotEmpty(Collection collection)
     Returns true if the collection contains one or more elements, false otherwise.
public static  booleannotEmpty(Object object)
     Returns true if the argument is not null, false otherwise.
public static  booleannotEmpty(String string)
     Returns true if the argument is neither null nor only contains whitespace characters, false otherwise.
public static  booleanone(Collection collection, Predicate predicate)
     Returns true when the argument expression evaluates true for one and only one element in the collection.
public static  booleanone(Object collection, Predicate predicate)
    

Returns true if collection is actually a Collection instance and if the predicate expression evaluates true for one and only one element in the collection.

public static  Objectprepend(List list, Object item)
     Insert the item into the first position of the list.
public static  Collectionreject(Collection collection, Predicate predicate)
     Returns a subcollection of the source collection containing all elements for which the expression evaluates false.
public static  Collectionselect(Collection collection, Predicate predicate)
     Returns a subcollection of the source collection containing all elements for which the expression evaluates true.
public static  Collectionselect(Object collection, Predicate predicate)
     Returns a subcollection of the source collection containing all elements for which the expression evaluates true.
public static  intsize(Object object)
     Checks the instance of the object and makes sure its a Collection, if the object is a collection the size is checked and returned, if its NOT a collection, 0 is returned.
Parameters:
  object - the object to check.
public static  intsize(Collection collection)
     Returns the number of elements in the collection.
public static  CollectionsortedBy(Collection collection)
    
public static  SetsubOrderedSet(Set collection)
    
public static  ListsubSequence(List collection)
    
public static  doublesum(Object collection)
     Returns the sum of all the element in the collection.
public static  doublesum(Collection collection)
     Returns the sum of all the element in the collection.
public static  CollectionsymmetricDifference(Collection first, Collection second)
     Returns those element that are contained in only one of both collections.
public static  Collectionunion(Collection first, Collection second)
     Returns the union of both collections into a single collection.



Method Detail
any
public static Object any(Collection collection, Predicate predicate)(Code)
Returns a random element from the collection for which the argument expression evaluates true.



append
public static boolean append(List list, Object item)(Code)
Appends the item to the list. true if the operation was a success



append
public static boolean append(Bag collection, Object item)(Code)
Appends the item to the bag. true if the operation was a success



asBag
public static Bag asBag(Collection collection)(Code)
Returns the argument as a bag.



asOrderedSet
public static Set asOrderedSet(Collection collection)(Code)
Returns the argument as an ordered set.



asSequence
public static List asSequence(Collection collection)(Code)
Returns the argument as a list.



asSet
public static Set asSet(Collection collection)(Code)
Returns the argument as a set.



at
public static Object at(List list, int index)(Code)
Returns the element at the specified index in the argument list.



collect
public static Collection collect(Collection collection, Transformer transformer)(Code)
Returns the collection of Objects that results from executing the transformer on each individual element in the source collection.



collectNested
public static Collection collectNested(Collection collection)(Code)



count
public static int count(Collection collection, Object item)(Code)
Counts the number of occurrences of the argument item in the source collection.



excludes
public static boolean excludes(Collection collection, Object item)(Code)
Return true if the object is not an element of the collection, false otherwise.



excludesAll
public static boolean excludesAll(Collection collection, Collection items)(Code)
Returns true if all elements of the parameter collection are not present in the current collection, false otherwise.



excluding
public static boolean excluding(Collection collection, Object item)(Code)
Removes all occurrences of the item in the source collection. true if one or more elements were removed



exists
public static boolean exists(Collection collection, Predicate predicate)(Code)
Returns true if a predicate is true for at least one element of a collection.

A null collection or predicate returns false.




exists
public static boolean exists(Object collection, Predicate predicate)(Code)
Returns true if a predicate is true for at least one element of a collection.

A null collection or predicate returns false.




first
public static Object first(Object object)(Code)
Returns the first element in the collection.
Parameters:
  object - the collection or single instance which will be converted to a collection. the first object of the collection or the object itself if the object is not a collection instance (ornull if the object is null or an empty collection).



flatten
public static Collection flatten(Collection collection)(Code)
Recursively flattens this collection, this method returns a Collection containing no nested Collection instances.



forAll
public static boolean forAll(Collection collection, Predicate predicate)(Code)

Executes every predicate for the given collectoin, if one evaluates to false this operation returns false, otherwise true is returned.

If the input collection or closure is null false is returned. true if every evaluated predicate returns true, false otherwise.



forAll
public static boolean forAll(Object collection, Predicate predicate)(Code)

Executes every predicate for the given collection, if one evaluates to false this operation returns false, otherwise true is returned.

If the input collection or closure is null false is returned. true if every evaluated predicate returns true, false otherwise.



includes
public static boolean includes(Collection collection, Object item)(Code)
Returns true if the object is an element of the collection, false otherwise.



includesAll
public static boolean includesAll(Collection collection, Collection items)(Code)
Returns true if all elements of the parameter collection are present in the current collection, false otherwise.



including
public static boolean including(Collection collection, Object item)(Code)
Adds the item to the list true if the element was added



indexOf
public static int indexOf(List collection, Object item)(Code)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the lowest index i such that (o == null ? get(i) = =null : o.equals(get(i))), or -1 if there is no such index.



insertAt
public static void insertAt(List collection, int index, Object item)(Code)
Insert the item at the specified index into the collection.



intersection
public static Collection intersection(Collection first, Collection second)(Code)
Returns the collection of elements common in both argument collections.



isEmpty
public static boolean isEmpty(Collection collection)(Code)
Returns true if the collection contains no elements, false otherwise.



isEmpty
public static boolean isEmpty(Object object)(Code)
Returns true if the argument is null, false otherwise.



isEmpty
public static boolean isEmpty(String string)(Code)
Returns true if the argument is either null or only contains whitespace characters, false otherwise.



isUnique
public static boolean isUnique(Collection collection, Transformer transformer)(Code)
Returns true if the result of executing the transformer has a unique value for each element in the source collection.



isUnique
public static boolean isUnique(Object collection, Transformer transformer)(Code)
Returns true if the result of executing the transformer has a unique value for each element in the source collection.



iterate
public static Collection iterate(Collection collection)(Code)



last
public static Object last(Object object)(Code)
Returns the last element in the collection.
Parameters:
  object - the collection or single instance which will be converted to a collection. the last object of the collection or the object itself if the object is not a collection instance (ornull if the object is null or an empty collection).



notEmpty
public static boolean notEmpty(Collection collection)(Code)
Returns true if the collection contains one or more elements, false otherwise.



notEmpty
public static boolean notEmpty(Object object)(Code)
Returns true if the argument is not null, false otherwise.



notEmpty
public static boolean notEmpty(String string)(Code)
Returns true if the argument is neither null nor only contains whitespace characters, false otherwise.



one
public static boolean one(Collection collection, Predicate predicate)(Code)
Returns true when the argument expression evaluates true for one and only one element in the collection. Returns false otherwise.



one
public static boolean one(Object collection, Predicate predicate)(Code)

Returns true if collection is actually a Collection instance and if the predicate expression evaluates true for one and only one element in the collection. Returns false otherwise.




prepend
public static Object prepend(List list, Object item)(Code)
Insert the item into the first position of the list. the element previously at the first position



reject
public static Collection reject(Collection collection, Predicate predicate)(Code)
Returns a subcollection of the source collection containing all elements for which the expression evaluates false.



select
public static Collection select(Collection collection, Predicate predicate)(Code)
Returns a subcollection of the source collection containing all elements for which the expression evaluates true.



select
public static Collection select(Object collection, Predicate predicate)(Code)
Returns a subcollection of the source collection containing all elements for which the expression evaluates true.



size
public static int size(Object object)(Code)
Checks the instance of the object and makes sure its a Collection, if the object is a collection the size is checked and returned, if its NOT a collection, 0 is returned.
Parameters:
  object - the object to check. the size of the collection



size
public static int size(Collection collection)(Code)
Returns the number of elements in the collection.



sortedBy
public static Collection sortedBy(Collection collection)(Code)



subOrderedSet
public static Set subOrderedSet(Set collection)(Code)



subSequence
public static List subSequence(List collection)(Code)



sum
public static double sum(Object collection)(Code)
Returns the sum of all the element in the collection. Every element must extend java.lang.Number or this method will throw an exception.
Parameters:
  collection - a collection containing only classes extending java.lang.Number the sum of all the elements in the collection



sum
public static double sum(Collection collection)(Code)
Returns the sum of all the element in the collection. Every element must extend java.lang.Number or this method will throw an exception.
Parameters:
  collection - a collection containing only classes extending java.lang.Number the sum of all the elements in the collection



symmetricDifference
public static Collection symmetricDifference(Collection first, Collection second)(Code)
Returns those element that are contained in only one of both collections.



union
public static Collection union(Collection first, Collection second)(Code)
Returns the union of both collections into a single collection.



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.