@Override public int compareTo(Ref o) { if (this.equals(o)) { return 0; } else { // Order by namespace, then ID if (this.getNamespace().equals(o.getNamespace())) { if (this.getId().equals(o.getId())) { // Shouldn't happen because equals() should return true throw new IllegalStateException("equals() was inaccurate in " + this.getClass().getName()); } else { return this.getId().compareTo(o.getId()); } } else { return this.getNamespace().compareTo(o.getNamespace()); } } } }
@Override public int compareTo(Ref o) { if (this.equals(o)) { return 0; } else { // Order by namespace, then ID if (this.getNamespace().equals(o.getNamespace())) { if (this.getId().equals(o.getId())) { // Shouldn't happen because equals() should return true throw new IllegalStateException("equals() was inaccurate in " + this.getClass().getName()); } else { return this.getId().compareTo(o.getId()); } } else { return this.getNamespace().compareTo(o.getNamespace()); } } } }
@Override public int compareTo(Ref o) { if (this.equals(o)) { return 0; } else { // Order by namespace, then ID if (this.getNamespace().equals(o.getNamespace())) { if (this.getId().equals(o.getId())) { // Shouldn't happen because equals() should return true throw new IllegalStateException("equals() was inaccurate in " + this.getClass().getName()); } else { return this.getId().compareTo(o.getId()); } } else { return this.getNamespace().compareTo(o.getNamespace()); } } } }
@Override public SimpleConnector clone() { SimpleConnector retval = new SimpleConnector(getNamespace(), getId(), getLabel(), getVertex()); // This will infinite loop... so it's not a completely accurate clone() /* if (m_edge != null) { retval.setEdge(m_edge.clone()); } */ return retval; }
@Override public SimpleConnector clone() { SimpleConnector retval = new SimpleConnector(getNamespace(), getId(), getLabel(), getVertex()); // This will infinite loop... so it's not a completely accurate clone() /* if (m_edge != null) { retval.setEdge(m_edge.clone()); } */ return retval; }
@Override public SimpleConnector clone() { SimpleConnector retval = new SimpleConnector(getNamespace(), getId(), getLabel(), getVertex()); // This will infinite loop... so it's not a completely accurate clone() /* if (m_edge != null) { retval.setEdge(m_edge.clone()); } */ return retval; }