@Test public void testToStringSimple() { EntityTag entityTag = new EntityTag("test", false); assertEquals("\"test\"", entityTagHeaderDelegate.toString(entityTag)); }
@Override public String toString(EntityTag entityTag) { if (entityTag == null) { throw new IllegalArgumentException(); } StringBuilder sb = new StringBuilder(); if (entityTag.isWeak()) { sb.append('W').append('/'); } sb.append('"'); HeaderHelper.appendEscapeQuote(sb, entityTag.getValue()); sb.append('"'); return sb.toString(); }
EntityTagHeaderDelegate implements RuntimeDelegate.HeaderDelegate<EntityTag> { @Override public String toString(EntityTag entityTag) { if (entityTag == null) { throw new IllegalArgumentException(); } StringBuilder sb = new StringBuilder(); if (entityTag.isWeak()) { sb.append('W').append('/'); } sb.append('"'); HeaderHelper.appendEscapeQuote(sb, entityTag.getValue()); sb.append('"'); return sb.toString(); } }
EntityTagHeaderDelegate implements RuntimeDelegate.HeaderDelegate<EntityTag> { @Override public String toString(EntityTag entityTag) { if (entityTag == null) { throw new IllegalArgumentException(); } StringBuilder sb = new StringBuilder(); if (entityTag.isWeak()) { sb.append('W').append('/'); } sb.append('"'); HeaderHelper.appendEscapeQuote(sb, entityTag.getValue()); sb.append('"'); return sb.toString(); }  }
EntityTagHeaderDelegate implements RuntimeDelegate.HeaderDelegate<EntityTag> { @Override public String toString(EntityTag entityTag) { if (entityTag == null) { throw new IllegalArgumentException(); } StringBuilder sb = new StringBuilder(); if (entityTag.isWeak()) { sb.append('W').append('/'); } sb.append('"'); HeaderHelper.appendEscapeQuote(sb, entityTag.getValue()); sb.append('"'); return sb.toString(); }  @Override EntityTag fromString(String header); @Override String toString(EntityTag entityTag); }
EntityTagHeaderDelegate implements RuntimeDelegate.HeaderDelegate<EntityTag> { @Override public String toString(EntityTag entityTag) { if (entityTag == null) { throw new IllegalArgumentException(); } StringBuilder sb = new StringBuilder(); if (entityTag.isWeak()) { sb.append('W').append('/'); } sb.append('"'); HeaderHelper.appendEscapeQuote(sb, entityTag.getValue()); sb.append('"'); return sb.toString(); }  @Override EntityTag fromString(String header); @Override String toString(EntityTag entityTag);  }