Code example for NavigableSet

Methods: comparator

0
  @Override public void setUp() throws Exception { 
    super.setUp(); 
    navigableSet = (NavigableSet<E>) getSet();
    values = Helpers.copyToList(getSubjectGenerator().getSampleElements(
        getSubjectGenerator().getCollectionSize().getNumElements())); 
    Collections.sort(values, navigableSet.comparator());
 
    // some tests assume SEVERAL == 3 
    if (values.size() >= 1) {
      a = values.get(0);
      if (values.size() >= 3) {
        b = values.get(1);
        c = values.get(2);
      } 
    } 
  } 
   
  /** 
   * Resets the contents of navigableSet to have elements a, c, for the 
   * navigation tests.