コード例 #1
0
ファイル: MuTable.java プロジェクト: jonesd/udanax-gold2java
 /** Unboxed version. See class comment for XuInteger */
 public void intIntroduce(int key, Heaper value) {
   introduce(IntegerPos.make(key), value);
   /*
   udanax-top.st:48006:MuTable methodsFor: 'overloads'!
   {void} atInt: key {IntegerVar} introduce: value {Heaper}
   	"Unboxed version.  See class comment for XuInteger"
   	self at: key integer introduce: value!
   */
 }
コード例 #2
0
ファイル: MuTable.java プロジェクト: jonesd/udanax-gold2java
 public void introduceAll(ScruTable table, Dsp dsp) {
   TableStepper stepper;
   if (!(table.coordinateSpace().isEqual(coordinateSpace()))) {
     throw new AboraRuntimeException(AboraRuntimeException.WRONG_COORD_SPACE);
   }
   if (domain().intersects((dsp.ofAll(table.domain())))) {
     throw new AboraRuntimeException(AboraRuntimeException.ALREADY_IN_TABLE);
   }
   if (dsp == null) {
     Stepper stomper = (stepper = table.stepper());
     for (; stomper.hasValue(); stomper.step()) {
       Heaper d = (Heaper) stomper.fetch();
       if (d == null) {
         continue;
       }
       introduce(stepper.position(), d);
     }
     stomper.destroy();
   } else {
     Stepper stomper2 = (stepper = table.stepper());
     for (; stomper2.hasValue(); stomper2.step()) {
       Heaper e = (Heaper) stomper2.fetch();
       if (e == null) {
         continue;
       }
       introduce((dsp.of(stepper.position())), e);
     }
     stomper2.destroy();
   }
   /*
   udanax-top.st:48046:MuTable methodsFor: 'smalltalk: defaults'!
   {void} introduceAll: table {ScruTable} with: dsp {Dsp default: NULL}
   	| stepper {TableStepper} |
   	(table coordinateSpace isEqual: self coordinateSpace)
   		ifFalse: [Heaper BLAST: #WrongCoordSpace].
   	(self domain intersects: (dsp ofAll: table domain))
   		ifTrue: [Heaper BLAST: #AlreadyInTable].
   	dsp == NULL
   		ifTrue: [(stepper _ table stepper) forEach: [:d {Heaper} |
   				self at: stepper position introduce: d]]
   		ifFalse: [(stepper _ table stepper) forEach: [:e {Heaper} |
   				self at: (dsp of: stepper position) introduce: e]]!
   */
 }