Examples of serializeAppendTo()


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

    sb = new StringBuilder();
    CategoryPath p = new CategoryPath();
    for (int i=0; i<1000; i++) {
      p.add(Integer.toString(i));
    }
    p.serializeAppendTo(sb);
    p.serializeAppendTo(sb);
    p.serializeAppendTo(sb);
    offset=0;
    assertTrue(p.equalsToSerialized(sb, offset));
    assertEquals(p.hashCode(), CategoryPath.hashCodeOfSerialized(sb, offset));
View Full Code Here

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

    CategoryPath p = new CategoryPath();
    for (int i=0; i<1000; i++) {
      p.add(Integer.toString(i));
    }
    p.serializeAppendTo(sb);
    p.serializeAppendTo(sb);
    p.serializeAppendTo(sb);
    offset=0;
    assertTrue(p.equalsToSerialized(sb, offset));
    assertEquals(p.hashCode(), CategoryPath.hashCodeOfSerialized(sb, offset));
    offset = tmp.setFromSerialized(sb, offset);
View Full Code Here

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

    for (int i=0; i<1000; i++) {
      p.add(Integer.toString(i));
    }
    p.serializeAppendTo(sb);
    p.serializeAppendTo(sb);
    p.serializeAppendTo(sb);
    offset=0;
    assertTrue(p.equalsToSerialized(sb, offset));
    assertEquals(p.hashCode(), CategoryPath.hashCodeOfSerialized(sb, offset));
    offset = tmp.setFromSerialized(sb, offset);
    assertEquals(p, tmp);
View Full Code Here

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

      p.add(Integer.toString(i));
    }
    int[] prefixLengths = { 0, 574, 782, 783, 784, -1 };
    for (int prefixLen : prefixLengths) {
      sb = new StringBuilder();
      p.serializeAppendTo(prefixLen, sb);
      assertTrue(new CategoryPath(p, prefixLen).equalsToSerialized(sb, 0));
    }
   
    // Test the equalsToSerialized variant with a prefixLen
    // We use p and prefixLengths set above.
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.