|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsdai.lang.SdaiIterator
The instances of the class SdaiIterator
are used to iterate
through the members of an Aggregate
. For aggregates of the
EXPRESS type SET or BAG, the only possible access procedure is to start
from the beginning of the aggregate and go through all aggregate members
using next
method. For aggregates of the EXPRESS type LIST
or ARRAY, examination of their members is possible in both directions:
forward, using methods beginning
and next
and backward, using methods end
and previous
.
Method Summary | |
void |
beginning()
Positions this SdaiIterator before the first member of the
aggregate to which this SdaiIterator is attached. |
void |
end()
Positions this SdaiIterator after the last member of the
aggregate to which this SdaiIterator is attached.
|
int |
getValueBound()
This method is not implemented in current JSDAI version. |
boolean |
next()
Positions this SdaiIterator to reference the next member of the
aggregate to which this SdaiIterator is attached.
|
boolean |
previous()
Positions this SdaiIterator to reference the preceding member of the
aggregate to which this SdaiIterator is attached.
|
boolean |
remove()
Removes the member referenced by this SdaiIterator from the
aggregate to which this SdaiIterator is attached.
|
void |
unset()
Changes the value of a member of the attached aggregate at the position specified by this SdaiIterator so that this aggregate has no
value at that position. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void beginning() throws SdaiException
SdaiIterator
before the first member of the
aggregate to which this SdaiIterator
is attached.
SdaiException
- SS_NOPN, session is not open.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- AI_NEXS, aggregate instance does not exist.
SdaiException
- AI_NVLD, aggregate instance invalid.
SdaiException
- MO_NEXS, SDAI-model does not exist.public boolean next() throws SdaiException
SdaiIterator
to reference the next member of the
aggregate to which this SdaiIterator
is attached.
If the iterator currently references the last element, or is at the end of
the related aggregate and thus has no current member, or this aggregate is
empty, then the iterator is positioned to the end of the aggregate
without referencing any aggregate member.
This method is valid for aggregates of any EXPRESS type: ARRAY, LIST, SET, BAG.
true
if iterator has a new current member,
false
otherwise.
SdaiException
- SS_NOPN, session is not open.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- AI_NEXS, aggregate instance does not exist.
SdaiException
- AI_NVLD, aggregate instance invalid.
SdaiException
- MO_NEXS, SDAI-model does not exist.previous()
,
"ISO 10303-22::10.12.6 Next"public int getValueBound() throws SdaiException
SdaiException EX_NSUP will be thrown if this method is invoked.
SdaiIterator
.
SdaiException
- EX_NSUP, expression evaluation not supported.public boolean remove() throws SdaiException
SdaiIterator
from the
aggregate to which this SdaiIterator
is attached.
If the specified member is an aggregate instance, then that aggregate
instance is deleted along with all nested aggregate instances contained
by it. After execution of this method the iterator is positioned as if
next
method was applied. The method is valid for aggregates
of only EXPRESS types different than ARRAY.
The list of cases when SdaiException
is thrown
contains the following items:
SdaiIterator
is attached is empty;
SdaiIterator
is attached is read-only; such aggregates, for example, are in data
dictionary.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- AI_NEXS, aggregate instance does not exist.
SdaiException
- AI_NVLD, aggregate instance invalid.
SdaiException
- AI_NSET, aggregate instance is empty.
SdaiException
- IR_NSET, current member is not defined.
SdaiException
- FN_NAVL, function not available.next()
,
"ISO 10303-22::10.13.3 Remove current member"public void end() throws SdaiException
SdaiIterator
after the last member of the
aggregate to which this SdaiIterator
is attached.
The method is valid only when the EXPRESS type of the attached aggregate
is either ARRAY or LIST.
SdaiException
- SS_NOPN, session is not open.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- AI_NEXS, aggregate instance does not exist.
SdaiException
- AI_NVLD, aggregate instance invalid.public boolean previous() throws SdaiException
SdaiIterator
to reference the preceding member of the
aggregate to which this SdaiIterator
is attached.
If the iterator currently references the first element, or is at the beginning of
the related aggregate and thus has no current member, or this aggregate is
empty, then the iterator is positioned to the beginning of the aggregate
without referencing any aggregate member.
The method is valid only when the EXPRESS type of the attached aggregate
is either ARRAY or LIST.
true
if iterator has a new current member,
false
otherwise.
SdaiException
- SS_NOPN, session is not open.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- AI_NEXS, aggregate instance does not exist.
SdaiException
- AI_NVLD, aggregate instance invalid.next()
,
"ISO 10303-22::10.15.3 Previous"public void unset() throws SdaiException
SdaiIterator
so that this aggregate has no
value at that position. A subsequent application of testByIndex
methods at this index position will return value 0. If the old value is
an aggregate instance, then it is deleted along with any nested aggregate
instances contained by it. The method is valid only if the type of the
aggregate attached to this SdaiIterator
is ARRAY. If this
condition is violated, then SdaiException
AI_NVLD is thrown.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- AI_NEXS, aggregate instance does not exist.
SdaiException
- AI_NVLD, aggregate instance invalid.
SdaiException
- IR_NSET, current member is not defined.
SdaiException
- FN_NAVL, function not available.
|
Copyright © LKSoftWare GmbH, 1999-2008 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |