@Test public void testComposite() { BDD bdd1 = dstIp("1.2.3.4"); BDD bdd2 = srcIp("5.6.7.8"); Transition transition = new Composite(new Constraint(bdd1), new Constraint(bdd2)); assertThat(transition.transitForward(ONE), equalTo(bdd1.and(bdd2))); assertThat(transition.transitBackward(ONE), equalTo(bdd1.and(bdd2))); bdd2 = dstIp("5.6.7.8"); transition = new Composite(new Constraint(bdd1), new Constraint(bdd2)); assertThat(transition.transitForward(ONE), equalTo(ZERO)); assertThat(transition.transitBackward(ONE), equalTo(ZERO)); bdd2 = dstIp("1.2.3.4").or(dstIp("1.2.3.5")); transition = new Composite(new Constraint(bdd1), new Constraint(bdd2)); assertThat(transition.transitForward(ONE), equalTo(bdd1)); assertThat(transition.transitBackward(ONE), equalTo(bdd1)); }
Composite(Transition... transitions) { this(ImmutableList.copyOf(transitions)); }
Composite implements Transition { Composite(Transition... transitions) { this(ImmutableList.copyOf(transitions)); } }
Composite implements Transition { Composite(Transition... transitions) { this(ImmutableList.copyOf(transitions)); } Composite(Transition... transitions);   Composite(List<Transition> transitions); }
Composite implements Transition { Composite(Transition... transitions) { this(ImmutableList.copyOf(transitions)); } Composite(Transition... transitions);   Composite(List<Transition> transitions); List<Transition> getTransitions(); @Override BDD transitForward(BDD bdd); @Override BDD transitBackward(BDD bdd); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Composite implements Transition { Composite(Transition... transitions) { this(ImmutableList.copyOf(transitions)); } Composite(Transition... transitions);   Composite(List<Transition> transitions); List<Transition> getTransitions(); @Override BDD transitForward(BDD bdd); @Override BDD transitBackward(BDD bdd); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }