Examples of capacity()


Examples of org.jgroups.util.RingBuffer.capacity()

public class RingBufferTest {

    public void testConstructor() {
        RingBuffer buf=new RingBuffer(100, 1);
        System.out.println("buf = " + buf);
        assert buf.capacity() == Util.getNextHigherPowerOfTwo(100);
        assert buf.size() == 0;
    }

    public void testIndex() {
        RingBuffer<Integer> buf=new RingBuffer<Integer>(10, 5);
View Full Code Here

Examples of org.lwjgl.PointerBuffer.capacity()

  }

  static PointerBuffer getBufferPointer(final int size) {
    PointerBuffer buffer = bufferPointerTL.get();

    if ( buffer.capacity() < size ) {
      int sizeNew = buffer.capacity() << 1;
      while ( sizeNew < size )
        sizeNew <<= 1;

      buffer = BufferUtils.createPointerBuffer(size);
View Full Code Here

Examples of org.lwjgl.PointerBuffer.capacity()

  static PointerBuffer getBufferPointer(final int size) {
    PointerBuffer buffer = bufferPointerTL.get();

    if ( buffer.capacity() < size ) {
      int sizeNew = buffer.capacity() << 1;
      while ( sizeNew < size )
        sizeNew <<= 1;

      buffer = BufferUtils.createPointerBuffer(size);
      bufferPointerTL.set(buffer);
View Full Code Here

Examples of org.lwjgl.PointerBuffer.capacity()

  }

  static PointerBuffer getLengths(final int size) {
    PointerBuffer lengths = lengthsTL.get();

    if ( lengths.capacity() < size ) {
      int sizeNew = lengths.capacity();
      while ( sizeNew < size )
        sizeNew <<= 1;

      lengths = BufferUtils.createPointerBuffer(size);
View Full Code Here

Examples of org.lwjgl.PointerBuffer.capacity()

  static PointerBuffer getLengths(final int size) {
    PointerBuffer lengths = lengthsTL.get();

    if ( lengths.capacity() < size ) {
      int sizeNew = lengths.capacity();
      while ( sizeNew < size )
        sizeNew <<= 1;

      lengths = BufferUtils.createPointerBuffer(size);
      lengthsTL.set(lengths);
View Full Code Here

Examples of org.mortbay.io.Buffer.capacity()

        final Buffer[] buffers=thread_buffers._buffers[set];
        for (int i=0;i<buffers.length;i++)
        {
            final Buffer b=buffers[i];
            if (b!=null && b.capacity()==size)
            {
                buffers[i]=null;
                return b;
            }
        }
View Full Code Here

Examples of org.mortbay.io.ByteArrayBuffer.capacity()

        io.setInput("POST /foo HTTP/1.0\015\012" + "\015\012");
        ByteArrayBuffer buffer= new ByteArrayBuffer(4096);
        SimpleBuffers buffers=new SimpleBuffers(new Buffer[]{buffer});

        Handler handler = new Handler();
        HttpParser parser= new HttpParser(buffers,io, handler, buffer.capacity(), 0);
        parser.parse();
        assertEquals("POST", f0);
        assertEquals("/foo", f1);
        assertEquals("HTTP/1.0", f2);
        assertEquals(-1, h);
View Full Code Here

Examples of org.w3c.util.ArrayDictionary.capacity()

      return reply ;
  }

  String[] env  = new String[ssiVars.size()] ;
  for(int i=0,j=0;
      i<ssiVars.capacity() && ssiVars.keyAt(i)!=null;
      i++)
      env[j++] =
    (ssiVars.keyAt(i).toString())
    + "="
    + (ssiVars.elementAt(i).toString()) ;
View Full Code Here

Examples of weka.core.FastVector.capacity()

        attribute = new Attribute("a" + i);
      else
        attribute = new Attribute("a" + i, nominalValues);
      attributes.addElement(attribute);
    }
    for (int i = 0; i < classValues.capacity(); i++)
      classValues.addElement("c" + i);
    attribute = new Attribute ("class", classValues);
    attributes.addElement(attribute);

    dataset = new Instances(getRelationNameToUse(), attributes,
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.