@Override public int compareTo(Graph other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetNodeType()).compareTo(other.isSetNodeType()); if (lastComparison != 0) { return lastComparison; } if (isSetNodeType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeType, other.nodeType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRoots()).compareTo(other.isSetRoots()); if (lastComparison != 0) { return lastComparison; } if (isSetRoots()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roots, other.roots); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAdjacencyList()).compareTo(other.isSetAdjacencyList()); if (lastComparison != 0) { return lastComparison; } if (isSetAdjacencyList()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.adjacencyList, other.adjacencyList); if (lastComparison != 0) { return lastComparison; } } return 0; }