List of usage examples for java.util SortedSet first
E first();
From source file:net.sourceforge.fenixedu.domain.student.Registration.java
private RegistrationState getFirstRegistrationState(final RegistrationStateType stateType) { final SortedSet<RegistrationState> states = new TreeSet<RegistrationState>( RegistrationState.DATE_COMPARATOR); states.addAll(getRegistrationStates(stateType)); return states.first(); }
From source file:com.google.gwt.emultest.java.util.TreeSetTest.java
/** * Test method for 'java.util.SortedSet.first()'. * * @see java.util.SortedSet#first()/*from www.j a va 2s . c o m*/ */ public void testFirstKey_throwsNoSuchElementException() { SortedSet<E> SortedSet = createNavigableSet(); // test with no entries try { SortedSet.first(); fail("expected exception"); } catch (NoSuchElementException e) { // expected outcome } }