|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttudresden.ocl.lib.OclCollection
tudresden.ocl.lib.OclSequence
A OclSequence is a ordered collection of elements that may contain duplicates. See documentation of OclCollection for more information.
Indexing within an OclSequence begins with 1 for the first element.
OclCollection
Field Summary |
Fields inherited from class tudresden.ocl.lib.OclCollection |
collection, STRICT_VALUE_TYPES |
Constructor Summary | |
OclSequence(int dummy,
String reason)
constructor for undefined OclSequence |
|
OclSequence(List list)
public constructor for valid OclSequences; it should be considered to use Ocl.getOclSequenceFor(Object o) instead of calling this constructor directly |
Method Summary | |
OclSequence |
append(OclRoot obj)
Ocl.STRICT_VALUE_TYPES determines whether the returned OclSequence is a newly constructed one, or if this OclSequence is changed appropriately and then returned. |
OclRoot |
at(OclInteger index)
|
OclCollection |
collect(OclIterator iter,
OclRootEvaluatable eval)
|
OclCollection |
excluding(OclRoot obj)
remove obj form this collection and return the result |
OclRoot |
first()
|
static OclSequence |
getEmptyOclSequence()
static factory method for an OclSequence containg no elements |
OclRoot |
getFeature(String name)
If a feature of a collection is queried then this is interpreted to be the shorthand for collect (e.g. |
OclCollection |
including(OclRoot obj)
add obj to this collection and return the result |
OclBoolean |
isEqualTo(Object o)
two OclSequences are equal if they contain the same elements in the same order |
OclRoot |
last()
|
OclSequence |
prepend(OclRoot obj)
Ocl.STRICT_VALUE_TYPES determines whether the returned OclSequence is a newly constructed one, or if this OclSequence is changed appropriately and then returned. |
OclCollection |
select(OclIterator iter,
OclBooleanEvaluatable eval)
|
OclSequence |
subSequence(OclInteger lower,
OclInteger upper)
Ocl.STRICT_VALUE_TYPES determines whether the resulting OclSequence will be backed by the same java.lang.Collection as this OclSequence |
String |
toString()
|
OclCollection |
union(OclCollection col)
This method calls union(OclSequence seq) if the argument
col is of type OclSequence . |
OclSequence |
union(OclSequence seq)
|
Methods inherited from class tudresden.ocl.lib.OclCollection |
asBag, asSequence, asSet, becomeUndefined, collectToList, count, equals, excludes, exists, forAll, getFeatureAsCollection, getIterator, getUndefinedReason, includes, includesAll, isEmpty, isNotEqualTo, isUndefined, isUnique, iterate, notEmpty, reject, selectToList, setToInclude, setToRange, size, sortedBy, sum |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OclSequence(List list)
Ocl.getOclSequenceFor(Object o)
public OclSequence(int dummy, String reason)
Method Detail |
public static OclSequence getEmptyOclSequence()
public OclBoolean isEqualTo(Object o)
isEqualTo
in interface OclRoot
isEqualTo
in class OclCollection
public OclRoot getFeature(String name)
OclCollection
collect
(e.g. employee.name
as short
for employee.collect(name)
). Therefore, this method is
implemented to call
collect
appropriately.
getFeature
in interface OclRoot
getFeature
in class OclCollection
collect
OclCollection.getFeature(String name)
public OclCollection select(OclIterator iter, OclBooleanEvaluatable eval)
select
in class OclCollection
OclCollection.select(OclIterator iter, OclBooleanEvaluatable eval)
,
OclCollection.selectToList(OclIterator iter, OclBooleanEvaluatable eval)
public OclCollection collect(OclIterator iter, OclRootEvaluatable eval)
collect
in class OclCollection
OclCollection.collect(OclIterator iter, OclRootEvaluatable eval)
,
OclCollection.collectToList(OclIterator iter, OclRootEvaluatable eval)
public OclCollection union(OclCollection col)
union(OclSequence seq)
if the argument
col
is of type OclSequence
.
Return an undefined value, if not.
union
in class OclCollection
union(OclSequence seq)
public OclSequence union(OclSequence seq)
public OclSequence append(OclRoot obj)
java.util.Collection
backing this OclSequence
is not a java.util.List
, a new OclSequence is created
independent of Ocl.STRICT_VALUE_TYPES.
public OclSequence prepend(OclRoot obj)
java.util.Collection
backing this OclSequence
is not a java.util.List
, a new OclSequence is created
independent of Ocl.STRICT_VALUE_TYPES.
public OclSequence subSequence(OclInteger lower, OclInteger upper)
lower
- needs to be greater than or equal to 1 and less than or
equal to upper
upper
- needs to be less than or equal to the OclSequences
size()
lower
,
up to and including upper
; the first element of this
sequence has the number 1OclCollection.size()
public OclRoot at(OclInteger index)
index
- needs to be greater than 0 and less than or equal to
size()
index
public OclRoot first()
at( OclInteger<1> )
public OclRoot last()
at( size() )
public OclCollection including(OclRoot obj)
OclCollection
obj
to this collection and return the result
including
in class OclCollection
append(obj)
Ocl.STRICT_VALUE_TYPES
public OclCollection excluding(OclRoot obj)
OclCollection
obj
form this collection and return the result
excluding
in class OclCollection
obj
, in
the same order as in this OclSequenceOcl.STRICT_VALUE_TYPES
public String toString()
toString
in class OclCollection
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |