@Test public void add() { PropFile propFile = new PropFile(Context.named("test"), Loc.System); PropFile.Prop prop = propFile.add("test", "value"); assertNotNull(prop); assertEquals("test", prop.name); assertEquals("value", prop.value()); assertEquals("value", prop.unfilteredValue); assertEquals(Context.named("test"), prop.context()); assertEquals(Scope.Default, prop.scope()); assertEquals(Loc.System, prop.loc()); assertEquals("", prop.comments()); assertTrue(propFile.contains("test")); PropFile.Prop sameProp = propFile.add("test", "different"); assertSame(prop, sameProp); assertEquals("test", sameProp.name); assertEquals("value", sameProp.value()); assertEquals("value", sameProp.unfilteredValue); assertEquals("", sameProp.comments()); assertTrue(propFile.contains("test")); PropFile.Prop spacedProp = propFile.add(" test-spaced ", "value"); assertNotNull(spacedProp); assertEquals("test-spaced", spacedProp.name); assertEquals("value", spacedProp.value()); assertEquals("", spacedProp.comments()); assertTrue(propFile.contains("test-spaced")); prop = propFile.add("test-comments", "value", "comments"); assertNotNull(prop); assertEquals("test-comments", prop.name); assertEquals("value", prop.value()); assertEquals("comments", prop.comments()); assertTrue(propFile.contains("test-comments")); sameProp = propFile.add("test-comments", "different", "different"); assertSame(prop, sameProp); assertEquals("test-comments", sameProp.name); assertEquals("value", sameProp.value()); assertEquals("comments", sameProp.comments()); assertTrue(propFile.contains("test-comments")); prop = propFile.add("test-unfiltered-comments", "value", "comments"); assertNotNull(prop); assertEquals("test-unfiltered-comments", prop.name); assertEquals("value", prop.value()); assertEquals("comments", prop.comments()); assertTrue(propFile.contains("test-unfiltered-comments")); sameProp = propFile.add("test-unfiltered-comments", "different", "different"); assertSame(prop, sameProp); assertEquals("test-unfiltered-comments", sameProp.name); assertEquals("value", sameProp.value()); assertEquals("comments", sameProp.comments()); assertTrue(propFile.contains("test-unfiltered-comments")); }
public final Prop add(String name, String value) { return delegate.add(name, value, "", null); }
PropFile { public final Prop add(String name, String value) { return delegate.add(name, value, "", null); } }
PropFile { public final Prop add(String name, String value) { return delegate.add(name, value, "", null); } 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 Prop add(String name, String value) { return delegate.add(name, value, "", null); } 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 Prop add(String name, String value) { return delegate.add(name, value, "", null); } 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; }