@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetWeight(_weight); } }
@Override public Set<String> collectSources( Set<String> parentSources, Map<String, RoutingPolicy> routingPolicies, Warnings w) { return _statement.collectSources(parentSources, routingPolicies, w); }
@Override public boolean equals(Object rhs) { if (rhs instanceof StaticStatement) { return _type.equals(((StaticStatement) rhs)._type); } return false; }
@Override public final void applyTo( List<Statement> statements, CiscoConfiguration cc, Configuration c, Warnings w) { Statement setStatement = toSetStatement(cc, c, w); Statement bufferedStatement = new BufferedStatement(setStatement); statements.add(bufferedStatement); If ifStatement = new If( BooleanExprs.CALL_EXPR_CONTEXT, ImmutableList.of(Statements.SetLocalDefaultActionAccept.toStaticStatement()), ImmutableList.of(Statements.SetDefaultActionAccept.toStaticStatement())); statements.add(ifStatement); }
@Override public Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { CommunitySetExpr expr = _commSet.toCommunitySetExpr(cc, c, w); if (_additive) { return new AddCommunity(expr); } else { return new SetCommunity(expr); } } }
@Override public Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { if (_negated) { return new RetainCommunity(_commset.toCommunitySetExpr(cc, c, w)); } else { return new DeleteCommunity(_commset.toCommunitySetExpr(cc, c, w)); } } }
@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetMetric(_metric); } }
@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetTag(_tag); } }
@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetIsisLevel(_level); } }
public StaticStatement toStaticStatement() { return new StaticStatement(this); } }
@Override public String toString() { return _type.toString(); } }
@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new Comment(_text); } }
@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetOrigin(_origin); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof BufferedStatement)) { return false; } BufferedStatement other = (BufferedStatement) obj; return _statement.equals(other._statement); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _statement.hashCode(); return result; }
@Override public Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetLocalPreference(_pref); } }
@Override public int hashCode() { return _type.ordinal(); }
public Comment(String text) { setComment(text); }
@Override protected IntExpr featureValueOf(SetAdministrativeCost actual) { return actual.getAdmin(); } }
@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetMetric(_med); } }