@Test public void props() { PropFile systemProps = new PropFile(Context.named("context"), Loc.System); systemProps.add("one", "one-value"); systemProps.add("two", "two-value"); systemProps.add("three", "three-value"); Iterator<PropFile.Prop> iter = systemProps.props().iterator(); assertEquals("one", iter.next().name); assertEquals("two", iter.next().name); assertEquals("three", iter.next().name); assertFalse(iter.hasNext()); iter = systemProps.props().iterator(); assertEquals("one", iter.next().name); assertEquals("two", iter.next().name); assertEquals("three", iter.next().name); assertFalse(iter.hasNext()); systemProps.add("four", "four-value"); iter = systemProps.props().iterator(); assertEquals("one", iter.next().name); assertEquals("two", iter.next().name); assertEquals("three", iter.next().name); assertEquals("four", iter.next().name); assertFalse(iter.hasNext()); }
public final Iterable<Prop> props() { return props; }
PropFile { public final Iterable<Prop> props() { return props; } }
PropFile { public final Iterable<Prop> props() { return props; } PropFile(Context context, Loc loc);  PropFile(Context context, Scope scope, Loc loc); private  PropFile(Context context, Scope scope, Loc loc, Impl delegate); }
PropFile { public final Iterable<Prop> props() { return props; } PropFile(Context context, Loc loc);  PropFile(Context context, Scope scope, Loc loc); private  PropFile(Context context, Scope scope, Loc loc, Impl delegate); final Prop add(String name, String value); final Prop add(String name, String value, String comments); final Prop set(String name, String value); final boolean contains(String name); final Prop get(String name); final int size(); boolean isEmpty(); final Prop remove(String name); final Iterable<Prop> props(); @Override final boolean equals(Object o); @Override final int hashCode(); }
PropFile { public final Iterable<Prop> props() { return props; } PropFile(Context context, Loc loc);  PropFile(Context context, Scope scope, Loc loc); private  PropFile(Context context, Scope scope, Loc loc, Impl delegate); final Prop add(String name, String value); final Prop add(String name, String value, String comments); final Prop set(String name, String value); final boolean contains(String name); final Prop get(String name); final int size(); boolean isEmpty(); final Prop remove(String name); final Iterable<Prop> props(); @Override final boolean equals(Object o); @Override final int hashCode(); static final PropFile Empty; }