Examples of flip()


Examples of org.apache.lucene.util.OpenBitSet.flip()

      }
    }, precisionStep, lower, upper);
   
    if (useBitSet) {
      // after flipping all bits in the range, the cardinality should be zero
      bits.flip(0,upper-lower+1);
      assertTrue("The sub-range concenated should match the whole range", bits.isEmpty());
    }
  }
 
  /** LUCENE-2541: NumericRangeQuery errors with endpoints near long min and max values */
 
View Full Code Here

Examples of org.apache.lucene.util.OpenBitSetDISI.flip()

          bits.inPlaceOr(it);
        }
      }
      // this is somehow inverse, if we negate the filter, we delete all documents it matches!
      if (!negateFilter) {
        bits.flip(0, in.maxDoc());
      }

      if (in.hasDeletions()) {
        for (int i = 0; i < in.maxDoc(); i++) {
          if (in.isDeleted(i)) {
View Full Code Here

Examples of org.apache.mina.common.ByteBuffer.flip()

        TestDecoderOutput out = new TestDecoderOutput();
        ByteBuffer in = ByteBuffer.allocate(16);

        // Test one decode and one output
        in.putString("ABC\r\n", encoder);
        in.flip();
        decoder.decode(session, in, out);
        Assert.assertEquals(1, out.getMessageQueue().size());
        Assert.assertEquals("ABC", out.getMessageQueue().poll());

        // Test two decode and one output
View Full Code Here

Examples of org.apache.mina.common.IoBuffer.flip()

        int bytesRead = fileRegion.getFileChannel().read(buffer.buf(),
                fileRegion.getPosition());
        fileRegion.update(bytesRead);

        // return the buffer
        buffer.flip();
        return buffer;
    }

}
View Full Code Here

Examples of org.apache.mina.core.buffer.IoBuffer.flip()

  //
  //        buffer.putInt(request.getNumberOfCharacters());
  //
  //        buffer.flip();
     
      buffer.flip();
     
          out.write(buffer);
       
      } else if (message instanceof ServerStatusBean) {
       
View Full Code Here

Examples of org.apache.solr.util.OpenBitSet.flip()

      test( both3.docList.equals(both.docList) );
      test( both3.docSet.equals(both.docSet) );

      OpenBitSet bits = both.docSet.getBits();
      OpenBitSet neg = ((OpenBitSet)bits.clone());
      neg.flip(0, bits.capacity());

      // use the negative as a filter (should result in 0 matches)
      // todo - fix if filter is not null
      both2 = searcher.getDocListAndSet(query,new BitDocSet(neg),sort, start, limit);
      test( both2.docList.size() == 0 );
View Full Code Here

Examples of org.geotools.geometry.iso.topograph2D.Label.flip()

      Label labelToMerge = e.getLabel();
      // check if new edge is in reverse direction to existing edge
      // if so, must flip the label before merging it
      if (!existingEdge.isPointwiseEqual(e)) {
        labelToMerge = new Label(e.getLabel());
        labelToMerge.flip();
      }
      Depth depth = existingEdge.getDepth();
      // if this is the first duplicate found for this edge, initialize
      // the depths
      // /*
 
View Full Code Here

Examples of org.glassfish.grizzly.Buffer.flip()

           
            GrizzlyChannel.removeChannelIfDisconnectd(connection);
            byte[] bytes = output.toByteArray();
            Buffer buffer = connection.getTransport().getMemoryManager().allocate(bytes.length);
            buffer.put(bytes);
            buffer.flip();
            buffer.allowBufferDispose(true);
            context.setMessage(buffer);
        } finally {
            GrizzlyChannel.removeChannelIfDisconnectd(connection);
        }
View Full Code Here

Examples of org.gudy.azureus2.core3.util.DirectByteBuffer.flip()

     
      DirectByteBuffer   header = DirectByteBufferPool.getBuffer( DirectByteBuffer.AL_EXTERNAL, 4 );
     
      header.putInt( DirectByteBuffer.SS_MSG, payload.remaining( DirectByteBuffer.SS_MSG ));
     
      header.flip( DirectByteBuffer.SS_MSG );
     
      return(
        new RawMessage[]{
          new RawMessageImpl(
            message,
View Full Code Here

Examples of org.gudy.azureus2.core3.util.DirectByteBuffer.flip()

       
      }else{
       
        if ( read_buffer.position( DirectByteBuffer.SS_PROXY ) > 0 ){
         
          read_buffer.flip(DirectByteBuffer.SS_PROXY);
         
          int  written = read_buffer.write( DirectByteBuffer.SS_PROXY, chan2 );
                 
          if ( chan1 == source_channel ){
           
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.