@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TEntityType)) return false; TEntityType that = (TEntityType) o; return Objects.equals(getDescription(), that.getDescription()) && Objects.equals(getVersion(), that.getVersion()) && Objects.equals(getDerivedFrom(), that.getDerivedFrom()) && Objects.equals(getProperties(), that.getProperties()) && Objects.equals(getAttributes(), that.getAttributes()) && Objects.equals(getMetadata(), that.getMetadata()); }
@Override public int hashCode() { return Objects.hash(getDescription(), getVersion(), getDerivedFrom(), getProperties(), getAttributes(), getMetadata()); }
public Builder(TEntityType entityType) { this.description = entityType.getDescription(); this.version = entityType.getVersion(); this.derivedFrom = entityType.getDerivedFrom(); this.properties = entityType.getProperties(); this.attributes = entityType.getAttributes(); this.metadata = entityType.getMetadata(); }
@Override public String toString() { return "TEntityType{" + "description='" + getDescription() + '\'' + ", version=" + getVersion() + ", derivedFrom=" + getDerivedFrom() + ", properties=" + getProperties() + ", attributes=" + getAttributes() + ", metadata=" + getMetadata() + '}'; }
@Override public R visit(TEntityType node, P parameter) { return reduce(Stream.of( visitElement(node.getVersion(), parameter, "version"), visitElement(node.getProperties(), parameter, "properties"), visitElement(node.getAttributes(), parameter, "attributes"), visitElement(node.getMetadata(), parameter, "metadata") )); }
public Printer visit(TEntityType node, Parameter parameter) { return new Printer(parameter.getIndent()) .printKeyValue("description", node.getDescription()) .printKeyValue("version", node.getVersion()) .printKeyValue("derived_from", node.getDerivedFrom()) .print(printMap("properties", node.getProperties(), parameter)) .print(printMap("attributes", node.getAttributes(), parameter)) .print(node.getMetadata().accept(this, parameter)); }