Package org.apache.lucene.facet.search

Examples of org.apache.lucene.facet.search.FacetArrays.free()


    FacetArrays arrays = new FacetArrays(new IntArrayAllocator(1, 1), new FloatArrayAllocator(1, 1));

    int[] intArray = arrays.getIntArray();
    // Set the element, then free
    intArray[0] = 1;
    arrays.free();

    // We should expect a cleared array back
    intArray = arrays.getIntArray();
    assertEquals("Expected a cleared array back, but the array is still filled", 0, intArray[0]);
View Full Code Here


    assertEquals("Expected a cleared array back, but the array is still filled", 0, intArray[0]);

    float[] floatArray = arrays.getFloatArray();
    // Set the element, then free
    floatArray[0] = 1.0f;
    arrays.free();

    // We should expect a cleared array back
    floatArray = arrays.getFloatArray();
    assertEquals("Expected a cleared array back, but the array is still filled", 0.0f, floatArray[0], 0.0);
  }
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.