public class Diffs extends LinkedHashMap<String,Diffs>
Each individual difference is a String
(map key) and has optional further detail contained in another
Diffs
instance (map value, or null for none). Keys must not be null.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
Diffs()
Default constructor.
|
Diffs(Diffs other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(String description)
Add a difference without any sub-differences.
|
void |
add(String description,
Diffs diffs)
Add a difference with optional sub-differences.
|
String |
toString()
Format this instance as a
String . |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public Diffs()
public Diffs(Diffs other)
other
- instance to copypublic void add(String description)
description
- description of the differenceIllegalArgumentException
- if description
is nullpublic void add(String description, Diffs diffs)
description
- description of the differencediffs
- sub-differences, or null for noneIllegalArgumentException
- if description
is nullCopyright © 2022. All rights reserved.