Examples of copyAsSortedSet()


Examples of org.cyclop.model.QueryFavourites.copyAsSortedSet()

  @Test
  public void testEmptyFavourites() {
    QueryFavourites hist = new QueryFavourites();
    assertEquals(0, hist.size());
    assertFalse(hist.copyAsSortedSet().iterator().hasNext());

    CqlQuery query = new CqlQuery(CqlQueryType.SELECT, "select * from MyTable");
    QueryEntry histEntry = new QueryEntry(query, 6456);
    assertFalse(hist.contains(histEntry));
    try {
View Full Code Here

Examples of org.cyclop.model.QueryFavourites.copyAsSortedSet()

    CqlQuery query = new CqlQuery(CqlQueryType.SELECT, "select * from MyTable");
    QueryEntry histEntry = new QueryEntry(query, 6456);
    assertFalse(hist.contains(histEntry));
    try {
      hist.copyAsSortedSet().iterator().next();
      fail();
    } catch (NoSuchElementException e) {
      // OK
    }
  }
View Full Code Here

Examples of org.cyclop.model.QueryFavourites.copyAsSortedSet()

            int retry = 0;
            while (!readFavs.addWithSizeCheck(fav)) {
              retry++;
              assertTrue(retry < 100);

              ImmutableSortedSet<QueryEntry> favsSorted = readFavs.copyAsSortedSet();
              UnmodifiableIterator<QueryEntry> iterator = favsSorted.iterator();
              QueryEntry toRemove = null;
              for (int a = 0; a < favsSorted.size(); a++) {
                toRemove = iterator.next();
              }
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.