Examples of swap()


Examples of memory.structure.BasicIndexedBipartiteSet.swap()

        int b1 = set.add();
        int b2 = set.add();
        int b3 = set.add();
        int b4 = set.add();

        set.swap(b2);

        Assert.assertTrue(set.bundle(b1));
        Assert.assertFalse(set.bundle(b2));
        Assert.assertTrue(set.bundle(b3));
        Assert.assertTrue(set.bundle(b4));
View Full Code Here

Examples of memory.structure.BasicIndexedBipartiteSet.swap()

        Assert.assertFalse(set.bundle(b2));
        Assert.assertTrue(set.bundle(b3));
        Assert.assertTrue(set.bundle(b4));

        env.worldPush();
        set.swap(b3); // b3 is now fixed
        int b5 = set.add();

        Assert.assertTrue(set.bundle(b1));
        Assert.assertFalse(set.bundle(b2));
        Assert.assertFalse(set.bundle(b3));
View Full Code Here

Examples of memory.structure.BasicIndexedBipartiteSet.swap()

        Assert.assertTrue(set.bundle(b4));
        Assert.assertTrue(set.bundle(b5));

        env.worldPush();

        set.swap(b1); // b1 is now fixed

        int b6 = set.add();
        set.swap(b6);

        Assert.assertFalse(set.bundle(b1));
View Full Code Here

Examples of memory.structure.BasicIndexedBipartiteSet.swap()

        env.worldPush();

        set.swap(b1); // b1 is now fixed

        int b6 = set.add();
        set.swap(b6);

        Assert.assertFalse(set.bundle(b1));
        Assert.assertFalse(set.bundle(b2));
        Assert.assertFalse(set.bundle(b3));
        Assert.assertTrue(set.bundle(b4));
View Full Code Here

Examples of net.sf.cglib.core.CodeEmitter.swap()

/* 106 */       handler.end();
/* 107 */       e.return_value();
/* 108 */       e.catch_exception(handler, Constants.TYPE_THROWABLE);
/* 109 */       e.new_instance(BULK_BEAN_EXCEPTION);
/* 110 */       e.dup_x1();
/* 111 */       e.swap();
/* 112 */       e.load_local(index);
/* 113 */       e.invoke_constructor(BULK_BEAN_EXCEPTION, CSTRUCT_EXCEPTION);
/* 114 */       e.athrow();
/*     */     } else {
/* 116 */       e.return_value();
View Full Code Here

Examples of net.sf.cglib.core.CodeEmitter.swap()

/* 1022 */     e.goTo(end);
/*      */
/* 1024 */     e.mark(found_callback);
/* 1025 */     e.checkcast(CALLBACK_ARRAY);
/* 1026 */     e.load_local(me);
/* 1027 */     e.swap();
/* 1028 */     for (int i = this.callbackTypes.length - 1; i >= 0; i--) {
/* 1029 */       if (i != 0) {
/* 1030 */         e.dup2();
/*      */       }
/* 1032 */       e.aaload(i);
View Full Code Here

Examples of org.apache.flume.channel.recoverable.memory.wal.SequenceIDBuffer.swap()

  @Test
  public void testSwap() {
    SequenceIDBuffer buffer = new SequenceIDBuffer(2);
    buffer.put(0, Long.MAX_VALUE);
    buffer.put(1, Long.MIN_VALUE);
    buffer.swap(0, 1);
    Assert.assertEquals(buffer.get(0), Long.MIN_VALUE);
    Assert.assertEquals(buffer.get(1), Long.MAX_VALUE);
  }
}
View Full Code Here

Examples of org.apache.solr.core.CoreContainer.swap()

      }

      case SWAP: {
        do_persist = params.getBool(CoreAdminParams.PERSISTENT, cores.isPersistent());
        String other = required.get( CoreAdminParams.OTHER );
        cores.swap( cname, other );
        break;
      }

      default: {
        throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,
View Full Code Here

Examples of org.codehaus.groovy.classgen.asm.OperandStack.swap()

        if (setReferenceFromReference) {
            // rhs is ready to use reference, just put it in the field
            mv.visitVarInsn(ALOAD, 0);
            operandStack.push(controller.getClassNode());
            operandStack.swap();
            mv.visitFieldInsn(PUTFIELD, ownerName, field.getName(), BytecodeHelper.getTypeDescription(field.getType()));
        } else if (field.isHolder()){
            // rhs is normal value, set the value in the Reference
            operandStack.doGroovyCast(field.getOriginType());
            operandStack.box();
View Full Code Here

Examples of org.codehaus.groovy.classgen.asm.OperandStack.swap()

        } else {
            // rhs is normal value, set normal value
            operandStack.doGroovyCast(field.getOriginType());
            mv.visitVarInsn(ALOAD, 0);
            operandStack.push(controller.getClassNode());
            operandStack.swap();
            mv.visitFieldInsn(PUTFIELD, ownerName, field.getName(), BytecodeHelper.getTypeDescription(field.getType()));
        }
    }

    private void storeStaticField(FieldExpression expression) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.