@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _tag.hashCode(); return result; } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _weight.hashCode(); return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof SetAdministrativeCost)) { return false; } SetAdministrativeCost other = (SetAdministrativeCost) obj; return _admin.equals(other._admin); }
@Override public List<Long> evaluate(Environment environment) { ImmutableList.Builder<Long> listBuilder = ImmutableList.builder(); long as = _expr.evaluate(environment); int number = _number.evaluate(environment); for (int i = 0; i < number; i++) { listBuilder.add(as); } return listBuilder.build(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _admin.hashCode(); return result; } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof SetWeight)) { return false; } SetWeight other = (SetWeight) obj; return _weight.equals(other._weight); }
@Override public Prefix evaluate(Environment env) { Ip ip = _ip.evaluate(env); int prefixLength = _prefixLength.evaluate(env); return Prefix.create(ip, prefixLength); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof MatchMetric)) { return false; } MatchMetric other = (MatchMetric) obj; return _comparator == other._comparator && _metric.equals(other._metric); }
@Override public Prefix6 evaluate(Environment env) { Ip6 ip6 = _ip6.evaluate(env); int prefixLength = _prefixLength.evaluate(env); return new Prefix6(ip6, prefixLength); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _comparator.ordinal(); result = prime * result + _metric.hashCode(); return result; } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof SetTag)) { return false; } SetTag other = (SetTag) obj; return _tag.equals(other._tag); }
@Override public Result execute(Environment environment) { Result result = new Result(); int weight = _weight.evaluate(environment); BgpRoute.Builder bgpRouteBuilder = (BgpRoute.Builder) environment.getOutputRoute(); bgpRouteBuilder.setWeight(weight); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _expr.hashCode(); result = prime * result + _number.hashCode(); return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof MatchLocalPreference)) { return false; } MatchLocalPreference other = (MatchLocalPreference) obj; return _comparator == other._comparator && _metric.equals(other._metric); }
@Override public Result execute(Environment environment) { Result result = new Result(); int admin = _admin.evaluate(environment); environment.getOutputRoute().setAdmin(admin); if (environment.getWriteToIntermediateBgpAttributes()) { environment.getIntermediateBgpAttributes().setAdmin(admin); } return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _ip.hashCode(); result = prime * result + _prefixLength.hashCode(); return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof MatchTag)) { return false; } MatchTag other = (MatchTag) obj; return _cmp == other._cmp && _tag.equals(other._tag); }