@Test public void iteratesAlternativesAccordingRegistrationOrder() throws Exception { Iterator<Alternative> iterator = populated().iterator(); assertThat(iterator.next(),sameInstance((Alternative)ALT1)); assertThat(iterator.next(),sameInstance((Alternative)ALT2)); assertThat(iterator.hasNext(),equalTo(false)); }
@Override public Iterator<Alternative> iterator() { return new AlternativeIterator(this.entries.iterator()); }
ImmutableAlternatives implements Alternatives { @Override public Iterator<Alternative> iterator() { return new AlternativeIterator(this.entries.iterator()); } }
ImmutableAlternatives implements Alternatives { @Override public Iterator<Alternative> iterator() { return new AlternativeIterator(this.entries.iterator()); } private  ImmutableAlternatives(final ImmutableList<Entry> entries); }
ImmutableAlternatives implements Alternatives { @Override public Iterator<Alternative> iterator() { return new AlternativeIterator(this.entries.iterator()); } private  ImmutableAlternatives(final ImmutableList<Entry> entries); @Override Iterator<Alternative> iterator(); @Override int size(); @Override boolean isEmpty(); @Override ImmutableAlternative alternative(int i); @Override ImmutableQuality quality(int i); @Override String toString(); }
ImmutableAlternatives implements Alternatives { @Override public Iterator<Alternative> iterator() { return new AlternativeIterator(this.entries.iterator()); } private  ImmutableAlternatives(final ImmutableList<Entry> entries); @Override Iterator<Alternative> iterator(); @Override int size(); @Override boolean isEmpty(); @Override ImmutableAlternative alternative(int i); @Override ImmutableQuality quality(int i); @Override String toString();  }