@Test public void testToString() { final Header param1 = new BasicHeader("name1", "value1"); Assert.assertEquals("name1: value1", param1.toString()); final Header param2 = new BasicHeader("name1", null); Assert.assertEquals("name1: ", param2.toString()); }
@Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append(this.getName()).append(": "); if (this.getValue() != null) { buf.append(this.getValue()); } return buf.toString(); }
BasicHeader implements Header, Cloneable, Serializable { @Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append(this.getName()).append(": "); if (this.getValue() != null) { buf.append(this.getValue()); } return buf.toString(); } }
BasicHeader implements Header, Cloneable, Serializable { @Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append(this.getName()).append(": "); if (this.getValue() != null) { buf.append(this.getValue()); } return buf.toString(); } BasicHeader(final String name, final Object value);  BasicHeader(final String name, final Object value, final boolean sensitive); }
BasicHeader implements Header, Cloneable, Serializable { @Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append(this.getName()).append(": "); if (this.getValue() != null) { buf.append(this.getValue()); } return buf.toString(); } BasicHeader(final String name, final Object value);  BasicHeader(final String name, final Object value, final boolean sensitive); @Override String getName(); @Override String getValue(); @Override boolean isSensitive(); @Override String toString(); }
BasicHeader implements Header, Cloneable, Serializable { @Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append(this.getName()).append(": "); if (this.getValue() != null) { buf.append(this.getValue()); } return buf.toString(); } BasicHeader(final String name, final Object value);  BasicHeader(final String name, final Object value, final boolean sensitive); @Override String getName(); @Override String getValue(); @Override boolean isSensitive(); @Override String toString();  }