org.infolayer.util
Class AbstractOclCollection

java.lang.Object
  extended byorg.infolayer.util.AbstractOclCollection
All Implemented Interfaces:
OclCollection, Typed
Direct Known Subclasses:
DefaultOclCollection, IntervalOclCollection, MultiOclCollection, SingleOclCollection

public abstract class AbstractOclCollection
extends java.lang.Object
implements OclCollection

immutable(!) collections of objects


Field Summary
 
Fields inherited from interface org.infolayer.util.OclCollection
BAG, COLLECTION, names, ORDERED_SET, SEQUENCE, SET
 
Method Summary
 OclCollection append(java.lang.Object o)
           
 OclCollection asBag()
           
 OclCollection asSequence()
           
 OclCollection asSet()
           
 java.lang.Object at(long pos)
          Returns the n-th element of the collection.
 OclCollection collectNested(OclExpression expr)
           
 long count(java.lang.Object object)
          The number of times that object occurs in this collection
 OclCollection difference(OclCollection par)
           
 boolean equals(java.lang.Object o)
           
 boolean excludes(java.lang.Object object)
           
 boolean excludesAll(OclCollection collection)
           
 OclCollection excluding(java.lang.Object par)
           
 java.lang.Object first()
           
 OclCollection flatten()
           
 int getCollectionType()
           
 UmlClassifier getElementType()
           
 OclCollection getSealed()
           
 UmlClassifier getType()
          Returns the Uml type of this object
 boolean includes(java.lang.Object object)
           
 boolean includesAll(OclCollection collection)
           
 OclCollection including(java.lang.Object o)
           
 long indexOf(java.lang.Object o)
           
 OclCollection insertAt(long index, java.lang.Object o)
           
 OclCollection intersection(OclCollection c2)
           
 boolean isEmpty()
           
 boolean isSealed()
           
abstract  java.util.Iterator iterator()
           
 java.lang.Object last()
           
 java.lang.Object max()
           
 java.lang.Object min()
           
 boolean notEmpty()
           
 OclCollection prepend(java.lang.Object o)
           
 OclCollection reverse()
           
 OclCollection select(int permission)
           
 OclCollection select(OclExpression filter)
           
 long size()
          Returns the number of elements contained in this collection
 OclCollection sortedBy(OclExpression orderBy)
           
 OclCollection subSequence(long lower, long upper)
           
 java.lang.Object sum()
           
 OclCollection symmetricDifference(OclCollection par)
           
 java.lang.String toOclLiteral()
           
 java.lang.String toString()
           
 OclCollection union(OclCollection c2)
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

size

public long size()
Description copied from interface: OclCollection
Returns the number of elements contained in this collection

Specified by:
size in interface OclCollection

at

public java.lang.Object at(long pos)
Description copied from interface: OclCollection
Returns the n-th element of the collection. Please note that counting starts with 1.

Specified by:
at in interface OclCollection
Parameters:
pos - The index position of the desired element
Returns:
The element at the given index

count

public long count(java.lang.Object object)
Description copied from interface: OclCollection
The number of times that object occurs in this collection

Specified by:
count in interface OclCollection

includes

public boolean includes(java.lang.Object object)
Specified by:
includes in interface OclCollection

reverse

public OclCollection reverse()
Specified by:
reverse in interface OclCollection

indexOf

public long indexOf(java.lang.Object o)
Specified by:
indexOf in interface OclCollection

getElementType

public UmlClassifier getElementType()
Specified by:
getElementType in interface OclCollection

getCollectionType

public int getCollectionType()
Specified by:
getCollectionType in interface OclCollection

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object o)

getType

public UmlClassifier getType()
Description copied from interface: Typed
Returns the Uml type of this object

Specified by:
getType in interface Typed

select

public OclCollection select(OclExpression filter)
Specified by:
select in interface OclCollection

select

public OclCollection select(int permission)
Specified by:
select in interface OclCollection

sortedBy

public OclCollection sortedBy(OclExpression orderBy)
Specified by:
sortedBy in interface OclCollection

iterator

public abstract java.util.Iterator iterator()
Specified by:
iterator in interface OclCollection

excludes

public boolean excludes(java.lang.Object object)
Specified by:
excludes in interface OclCollection

includesAll

public boolean includesAll(OclCollection collection)
Specified by:
includesAll in interface OclCollection

excludesAll

public boolean excludesAll(OclCollection collection)
Specified by:
excludesAll in interface OclCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface OclCollection

notEmpty

public boolean notEmpty()
Specified by:
notEmpty in interface OclCollection

sum

public java.lang.Object sum()
Specified by:
sum in interface OclCollection

union

public OclCollection union(OclCollection c2)
Specified by:
union in interface OclCollection

intersection

public OclCollection intersection(OclCollection c2)
Specified by:
intersection in interface OclCollection

difference

public OclCollection difference(OclCollection par)
Specified by:
difference in interface OclCollection

including

public OclCollection including(java.lang.Object o)
Specified by:
including in interface OclCollection

excluding

public OclCollection excluding(java.lang.Object par)
Specified by:
excluding in interface OclCollection

symmetricDifference

public OclCollection symmetricDifference(OclCollection par)
Specified by:
symmetricDifference in interface OclCollection

flatten

public OclCollection flatten()
Specified by:
flatten in interface OclCollection

asSet

public OclCollection asSet()
Specified by:
asSet in interface OclCollection

asSequence

public OclCollection asSequence()
Specified by:
asSequence in interface OclCollection

asBag

public OclCollection asBag()
Specified by:
asBag in interface OclCollection

append

public OclCollection append(java.lang.Object o)
Specified by:
append in interface OclCollection

prepend

public OclCollection prepend(java.lang.Object o)
Specified by:
prepend in interface OclCollection

insertAt

public OclCollection insertAt(long index,
                              java.lang.Object o)
Specified by:
insertAt in interface OclCollection

subSequence

public OclCollection subSequence(long lower,
                                 long upper)
Specified by:
subSequence in interface OclCollection

max

public java.lang.Object max()
Specified by:
max in interface OclCollection

min

public java.lang.Object min()
Specified by:
min in interface OclCollection

first

public java.lang.Object first()
Specified by:
first in interface OclCollection

last

public java.lang.Object last()
Specified by:
last in interface OclCollection

toOclLiteral

public java.lang.String toOclLiteral()
Specified by:
toOclLiteral in interface Typed

collectNested

public OclCollection collectNested(OclExpression expr)
Specified by:
collectNested in interface OclCollection

isSealed

public boolean isSealed()
Specified by:
isSealed in interface OclCollection

getSealed

public OclCollection getSealed()
Specified by:
getSealed in interface OclCollection