@Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        } else if (!(other instanceof Trait)) {
            return false;
        } else if (hashCode() != other.hashCode()) { // take advantage of hashcode caching
            return false;
        } else {
            Trait b = (Trait) other;
            return toShapeId().equals(b.toShapeId()) && toNode().equals(b.toNode());
        }
    }
@param id ID of the trait.
@param nodeValue The node representation of the shape, if known and trusted.
smithy-model/src/main/java/software/amazon/smithy/model/traits/AbstractTrait.java