public String getSourceValue() {
   if (!isEdge()) {
     throw new UnsupportedOperationException(
         "Cannot access the source value of a GraphElementWithStatistics that contains an Entity: "
             + toString());
   }
   return graphElement.getEdge().getSourceValue();
 }
 public boolean isDirected() {
   if (!isEdge()) {
     throw new UnsupportedOperationException(
         "Cannot ask whether a GraphElementWithStatistics that is an Entity is directed: "
             + toString());
   }
   return graphElement.getEdge().isDirected();
 }
 public String getEntityType() {
   if (!isEntity()) {
     throw new UnsupportedOperationException(
         "Cannot access the entity type of a GraphElementWithStatistics that contains an Edge: "
             + toString());
   }
   return graphElement.getEntity().getEntityType();
 }
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((graphElement == null) ? 0 : graphElement.hashCode());
   result = prime * result + ((setOfStatistics == null) ? 0 : setOfStatistics.hashCode());
   return result;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   GraphElementWithStatistics other = (GraphElementWithStatistics) obj;
   if (graphElement == null) {
     if (other.graphElement != null) return false;
   } else if (!graphElement.equals(other.graphElement)) return false;
   if (setOfStatistics == null) {
     if (other.setOfStatistics != null) return false;
   } else if (!setOfStatistics.equals(other.setOfStatistics)) return false;
   return true;
 }
 public GraphElementWithStatistics clone() {
   return new GraphElementWithStatistics(graphElement.clone(), setOfStatistics.clone());
 }
 public boolean isEdge() {
   return !graphElement.isEntity();
 }
 public String getVisibility() {
   return graphElement.getVisibility();
 }
 public Date getEndDate() {
   return graphElement.getEndDate();
 }
 public Date getStartDate() {
   return graphElement.getStartDate();
 }
 public String getSummarySubType() {
   return graphElement.getSummarySubType();
 }
 /** Called to undo changes to elements during searching */
 private void popSearchStack() {
   List<GraphElement> alteredElements = searchStack.removeLast();
   for (GraphElement element : alteredElements) {
     element.clearRequirement();
   }
 }