Examples of capacityChars()


Examples of org.apache.lucene.facet.taxonomy.CategoryPath.capacityChars()

    p1 = new CategoryPath(p,1);
    assertEquals(1, p1.length());
    assertEquals("hi", p1.toString('/'));
    assertEquals(1, p1.capacityComponents());
    assertEquals(2, p1.capacityChars());

    p1 = new CategoryPath(p,0);
    assertEquals(0, p1.length());
    assertEquals("", p1.toString('/'));
    assertEquals(0, p1.capacityComponents());
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.CategoryPath.capacityChars()

    p1 = new CategoryPath(p,0);
    assertEquals(0, p1.length());
    assertEquals("", p1.toString('/'));
    assertEquals(0, p1.capacityComponents());
    assertEquals(0, p1.capacityChars());

    // with all the following lengths, the prefix should be the whole path:
    int[] lengths = { 3, -1, 4 };
    for (int i=0; i<lengths.length; i++) {
      p1 = new CategoryPath(p, lengths[i]);
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.CategoryPath.capacityChars()

      p1 = new CategoryPath(p, lengths[i]);
      assertEquals(3, p1.length());
      assertEquals("hi/there/man", p1.toString('/'));
      assertEquals(p, p1);
      assertEquals(3, p1.capacityComponents());
      assertEquals(10, p1.capacityChars());
    }
  }

  @Test
  public void testEquals() {
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.CategoryPath.capacityChars()

 
  @Test
  public void testArrayConstructor() {
    CategoryPath p = new CategoryPath("hello", "world", "yo");
    assertEquals(3, p.length());
    assertEquals(12, p.capacityChars());
    assertEquals(3, p.capacityComponents());
    assertEquals("hello/world/yo", p.toString('/'));
   
    p = new CategoryPath(new String[0]);
    assertEquals(0, p.length());
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.CategoryPath.capacityChars()

    assertEquals(3, p.capacityComponents());
    assertEquals("hello/world/yo", p.toString('/'));
   
    p = new CategoryPath(new String[0]);
    assertEquals(0, p.length());
    assertEquals(0, p.capacityChars());
    assertEquals(0, p.capacityComponents());
  }
 
  @Test
  public void testCharsNeededForFullPath() {
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.