@Test public void cloneDFW() { DictionaryForWrite original = new DictionaryForWrite(); original.getStringTable().getOrCreate("foobar"); original.getPathTable().getOrCreate(Arrays.asList("foo", "bar")); original.getTagsTable().getOrCreate(Tags.valueOf(singletonMap("baz", MetricValue.fromStrValue("baz")))); DictionaryForWrite copy = original.clone(); assertNotSame(original, copy); assertNotSame(original.getStringTable(), copy.getStringTable()); assertNotSame(original.getPathTable(), copy.getPathTable()); assertNotSame(original.getTagsTable(), copy.getTagsTable()); assertEquals(original, copy); }
@Override public DictionaryForWrite clone() { return new DictionaryForWrite(stringTable.clone(), pathTable.clone(), tagsTable.clone()); }
DictionaryForWrite implements Cloneable { @Override public DictionaryForWrite clone() { return new DictionaryForWrite(stringTable.clone(), pathTable.clone(), tagsTable.clone()); } }
DictionaryForWrite implements Cloneable { @Override public DictionaryForWrite clone() { return new DictionaryForWrite(stringTable.clone(), pathTable.clone(), tagsTable.clone()); } DictionaryForWrite();  DictionaryForWrite(DictionaryDelta input); }
DictionaryForWrite implements Cloneable { @Override public DictionaryForWrite clone() { return new DictionaryForWrite(stringTable.clone(), pathTable.clone(), tagsTable.clone()); } DictionaryForWrite();  DictionaryForWrite(DictionaryDelta input); boolean isEmpty(); DictionaryDelta asDictionaryDelta(); void reset(); dictionary_delta encode(); @Override DictionaryForWrite clone(); }
DictionaryForWrite implements Cloneable { @Override public DictionaryForWrite clone() { return new DictionaryForWrite(stringTable.clone(), pathTable.clone(), tagsTable.clone()); } DictionaryForWrite();  DictionaryForWrite(DictionaryDelta input); boolean isEmpty(); DictionaryDelta asDictionaryDelta(); void reset(); dictionary_delta encode(); @Override DictionaryForWrite clone();  }