Package org.apache.lucene.facet.taxonomy

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


    assertEquals("", p.toString('@'), "");
    p.clear();
    p.add("hello", '/');
    assertEquals(p.length(), 1);
    assertEquals(p.toString('@'), "hello");
    p.clear();
    p.add("hi/there", '/');
    assertEquals(p.length(), 2);
    assertEquals(p.toString('@'), "hi@there");
    p.clear();
    p.add("how/are/you/doing?", '/');
View Full Code Here


    assertEquals(p.toString('@'), "hello");
    p.clear();
    p.add("hi/there", '/');
    assertEquals(p.length(), 2);
    assertEquals(p.toString('@'), "hi@there");
    p.clear();
    p.add("how/are/you/doing?", '/');
    assertEquals(p.length(), 4);
    assertEquals(p.toString('@'), "how@are@you@doing?");
    // See that this is really an add, not replace:
    p.clear();
View Full Code Here

    p.clear();
    p.add("how/are/you/doing?", '/');
    assertEquals(p.length(), 4);
    assertEquals(p.toString('@'), "how@are@you@doing?");
    // See that this is really an add, not replace:
    p.clear();
    p.add("hi/there", '/');
    assertEquals(p.length(), 2);
    assertEquals(p.toString('@'), "hi@there");
    p.add("how/are/you/doing", '/');
    assertEquals(p.length(), 6);
View Full Code Here

    assertEquals(false, p1.equals(Integer.valueOf(3)));
    // Build two paths separately, and compare them
    p1.clear();
    p1.add("hello");
    p1.add("world");
    p2.clear();
    p2.add("hello");
    p2.add("world");
    assertEquals(true, p1.equals(p2));   
    // Check that comparison really don't look at old data which might
    // be stored in the array
View Full Code Here

    // be stored in the array
    p1.clear();
    p1.add("averylongcategoryname");
    p1.clear();
    p1.add("hi");
    p2.clear();
    p2.add("hi");
    assertEquals(true, p1.equals(p2));
    // Being of the same length is obviously not enough to be equal
    p1.clear();
    p1.add("hi");
View Full Code Here

    p2.add("hi");
    assertEquals(true, p1.equals(p2));
    // Being of the same length is obviously not enough to be equal
    p1.clear();
    p1.add("hi");
    p2.clear();
    p2.add("hello");
    assertEquals(false, p1.equals(p2));
    p1.clear();
    p1.add("hi");
    p2.clear();
View Full Code Here

    p2.clear();
    p2.add("hello");
    assertEquals(false, p1.equals(p2));
    p1.clear();
    p1.add("hi");
    p2.clear();
    p2.add("ho");
    assertEquals(false, p1.equals(p2));
  }
  @Test
  public void testHashCode() {
View Full Code Here

    assertEquals(false, p1.hashCode()==p2.hashCode());
    // Build two paths separately, and compare them
    p1.clear();
    p1.add("hello");
    p1.add("world");
    p2.clear();
    p2.add("hello");
    p2.add("world");
    assertEquals(p1.hashCode(), p2.hashCode());
    // Check that comparison really don't look at old data which might
    // be stored in the array
View Full Code Here

    // be stored in the array
    p1.clear();
    p1.add("averylongcategoryname");
    p1.clear();
    p1.add("hi");
    p2.clear();
    p2.add("hi");
    assertEquals(p1.hashCode(), p2.hashCode());
    // Being of the same length is obviously not enough to be equal
    p1.clear();
    p1.add("hi");
View Full Code Here

    p2.add("hi");
    assertEquals(p1.hashCode(), p2.hashCode());
    // Being of the same length is obviously not enough to be equal
    p1.clear();
    p1.add("hi");
    p2.clear();
    p2.add("hello");
    assertEquals(false, p1.hashCode()==p2.hashCode());
    p1.clear();
    p1.add("hi");
    p2.clear();
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.