/** * Returns a string representation of this child node entry. * * @return string representation */ @Override public String toString() { String name = getName(); NodeState state = getNodeState(); if (state.getChildNodeCount(1) == 0) { return name + " : " + state; } else { return name + " = { ... }"; } }
/** * Returns a string representation of this child node entry. * * @return string representation */ @Override public String toString() { String name = getName(); NodeState state = getNodeState(); if (state.getChildNodeCount(1) == 0) { return name + " : " + state; } else { return name + " = { ... }"; } }
/** * Checks whether the given object is equal to this one. Two child node * entries are considered equal if both their names and referenced node * states match. Subclasses may override this method with a more efficient * equality check if one is available. * * @param that target of the comparison * @return {@code true} if the objects are equal, * {@code false} otherwise */ @Override public boolean equals(Object that) { if (this == that) { return true; } else if (that instanceof ChildNodeEntry) { ChildNodeEntry other = (ChildNodeEntry) that; return getName().equals(other.getName()) && getNodeState().equals(other.getNodeState()); } else { return false; } }
/** * Checks whether the given object is equal to this one. Two child node * entries are considered equal if both their names and referenced node * states match. Subclasses may override this method with a more efficient * equality check if one is available. * * @param that target of the comparison * @return {@code true} if the objects are equal, * {@code false} otherwise */ @Override public boolean equals(Object that) { if (this == that) { return true; } else if (that instanceof ChildNodeEntry) { ChildNodeEntry other = (ChildNodeEntry) that; return getName().equals(other.getName()) && getNodeState().equals(other.getNodeState()); } else { return false; } }