Follow up on r1197 and make deepCopy package-private. We don't want to use protected because some of the classes are non-final and protected shows up in the Javadocs.
This commit is contained in:
parent
a973837dd4
commit
411c5c0b50
@ -41,7 +41,7 @@ public final class JsonArray extends JsonElement implements Iterable<JsonElement
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JsonArray deepCopy() {
|
||||
JsonArray deepCopy() {
|
||||
JsonArray result = new JsonArray();
|
||||
for (JsonElement element : elements) {
|
||||
result.add(element.deepCopy());
|
||||
|
@ -35,7 +35,7 @@ public abstract class JsonElement {
|
||||
* Returns a deep copy of this element. Immutable elements like primitives
|
||||
* and nulls are not copied.
|
||||
*/
|
||||
protected abstract JsonElement deepCopy();
|
||||
abstract JsonElement deepCopy();
|
||||
|
||||
/**
|
||||
* provides check for verifying if this element is an array or not.
|
||||
|
@ -41,7 +41,7 @@ public final class JsonNull extends JsonElement {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JsonNull deepCopy() {
|
||||
JsonNull deepCopy() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public final class JsonObject extends JsonElement {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JsonObject deepCopy() {
|
||||
JsonObject deepCopy() {
|
||||
JsonObject result = new JsonObject();
|
||||
for (Map.Entry<String, JsonElement> entry : members.entrySet()) {
|
||||
result.add(entry.getKey(), entry.getValue().deepCopy());
|
||||
|
@ -86,7 +86,7 @@ public final class JsonPrimitive extends JsonElement {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JsonPrimitive deepCopy() {
|
||||
JsonPrimitive deepCopy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user