public void verifyEntry() { boolean notDone; notDone = true; while (notDone) { if ((incrementInternal > 0 && (indexInternal < lastValueInternal)) || (incrementInternal < 0 && (indexInternal >= lastValueInternal))) { if ((arrayInternal.intFetch(indexInternal)) == null) { indexInternal = indexInternal + incrementInternal; } else { notDone = false; } } else { notDone = false; } } /* udanax-top.st:56100:ITGenericStepper methodsFor: 'private: private'! {void} verifyEntry | notDone {BooleanVar} | notDone _ true. [notDone] whileTrue: [ ((incrementInternal > Int32Zero and: [indexInternal < lastValueInternal]) or: [incrementInternal < Int32Zero and: [indexInternal >= lastValueInternal]]) ifTrue: [(arrayInternal intFetch: indexInternal) == NULL ifTrue: [indexInternal _ indexInternal + incrementInternal] ifFalse: [notDone _ false]] ifFalse: [notDone _ false]]! */ }
public ITGenericStepper(IntegerTable array, int index) { super(); arrayInternal = (IntegerTable) array.copy(); indexInternal = index; lastValueInternal = arrayInternal.highestIndex(); incrementInternal = 1; /* udanax-top.st:56077:ITGenericStepper methodsFor: 'create'! create: array {IntegerTable} with: index {IntegerVar} super create. arrayInternal _ array copy cast: IntegerTable. indexInternal _ index. lastValueInternal _ arrayInternal highestIndex. incrementInternal _ 1! */ }
public ITGenericStepper(IntegerTable array) { super(); arrayInternal = ((IntegerTable) array.copy()); indexInternal = 0; lastValueInternal = arrayInternal.highestIndex(); incrementInternal = 1; /* udanax-top.st:56055:ITGenericStepper methodsFor: 'create'! create: array {IntegerTable} super create. arrayInternal _ (array copy cast: IntegerTable). indexInternal _ IntegerVar0. lastValueInternal _ arrayInternal highestIndex. incrementInternal _ 1! */ }
public ITGenericStepper(IntegerTable onTable, OrderSpec anOrder) { super(); if ((anOrder.followsInt(1, 0)) /* order is ascending */ ) { arrayInternal = ((IntegerTable) onTable.copy()); indexInternal = onTable.lowestIndex(); lastValueInternal = onTable.highestIndex(); incrementInternal = 1; } else /* order is descending */ { arrayInternal = ((IntegerTable) onTable.copy()); indexInternal = onTable.highestIndex(); lastValueInternal = onTable.lowestIndex(); incrementInternal = -1; } /* udanax-top.st:56062:ITGenericStepper methodsFor: 'create'! create: onTable {IntegerTable} with.OrderSpec: anOrder {OrderSpec} super create. (anOrder followsInt: 1 with: IntegerVar0) ifTrue: "order is ascending" [arrayInternal _ (onTable copy cast: IntegerTable). indexInternal _ onTable lowestIndex. lastValueInternal _ onTable highestIndex. incrementInternal _ 1] ifFalse: "order is descending" [arrayInternal _ (onTable copy cast: IntegerTable). indexInternal _ onTable highestIndex. lastValueInternal _ onTable lowestIndex. incrementInternal _ -1]! */ }
public Heaper fetch() { if (hasValue()) { return arrayInternal.intFetch(indexInternal); } else { return null; } /* udanax-top.st:56025:ITGenericStepper methodsFor: 'operations'! {Heaper wimpy} fetch self hasValue ifTrue: [^ arrayInternal intFetch: indexInternal] ifFalse: [^NULL]! */ }
/** A new empty MuTable whose domain space is 'cs'. */ public static MuTable make(CoordinateSpace cs) { if (cs.isEqual(IntegerSpace.make())) { return IntegerTable.make(10); } else { return HashTable.makeCoordinateSpace(cs); } /* udanax-top.st:48132:MuTable class methodsFor: 'pseudo constructors'! {MuTable} make: cs {CoordinateSpace} "A new empty MuTable whose domain space is 'cs'." (cs isEqual: IntegerSpace make) ifTrue: [^IntegerTable make: 10] ifFalse: [^HashTable make.CoordinateSpace: cs]! */ }
public ITGenericStepper(IntegerTable array, int start, int stop, int direction) { super(); arrayInternal = (IntegerTable) array.copy(); indexInternal = start; lastValueInternal = stop; incrementInternal = direction; /* udanax-top.st:56091:ITGenericStepper methodsFor: 'create'! create: array {IntegerTable} with: start {IntegerVar} with: stop {IntegerVar} with: direction {IntegerVar} super create. arrayInternal _ array copy cast: IntegerTable. indexInternal _ start. lastValueInternal _ stop. incrementInternal _ direction DOTasLong! */ }
/** * Semantically identical to 'muTable(cs)'. 'reg' just provides a hint as to what part of the * domain space the new table should expect to be occupied. */ public static MuTable make(CoordinateSpace cs, XnRegion reg) { if (cs.isEqual(IntegerSpace.make())) { return IntegerTable.makeRegion(((IntegerRegion) reg)); } else { return HashTable.makeCoordinateSpace(cs); } /* udanax-top.st:48139:MuTable class methodsFor: 'pseudo constructors'! {MuTable} make: cs {CoordinateSpace} with: reg {XnRegion} "Semantically identical to 'muTable(cs)'. 'reg' just provides a hint as to what part of the domain space the new table should expect to be occupied." (cs isEqual: IntegerSpace make) ifTrue: [^IntegerTable make.Region: (reg cast: IntegerRegion)] ifFalse: [^HashTable make.CoordinateSpace: cs]! */ }