Exemplo n.º 1
0
 /**
  * Instructs the <code>Project</code> that one <code>Builder</code> depends on the other. Both
  * <code>Builder</code> instances must first be added to this <code>Project</code>.
  *
  * <p><code>builder1</code> depends on <code>builder2</code>.
  *
  * @param builder1 A <code>Builder</code>. This <code>Builder</code> depends on the other.
  * @param builder2 A <code>Builder</code>.
  */
 public void dependsOn(Builder builder1, Builder builder2) {
   String head = Integer.toString(builder1.hashCode()),
       tail = Integer.toString(builder2.hashCode());
   if (!head.equals(tail)
       && dependencies.containsKey(head)
       && dependencies.containsKey(tail)
       && !dependencies.dependencyExists(head, tail)) {
     dependencies.addDependency(head, tail);
   }
 }