@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new IcmpTypeCodesApplication(0, ImmutableList.of(ALL_CODES))) .addEqualityGroup(new IcmpTypeCodesApplication(1, ImmutableList.of(ALL_CODES))) .addEqualityGroup(new IcmpTypeCodesApplication(0, ImmutableList.of(SubRange.singleton(8)))) .addEqualityGroup(new IcmpTypeCodesApplication(0, ImmutableList.of(new SubRange(0, 8)))) .addEqualityGroup(new IcmpTypeCodesApplication(0, ImmutableList.of(new SubRange(8, 0)))) .addEqualityGroup( new IcmpTypeCodesApplication( 0, ImmutableList.of(SubRange.singleton(0), SubRange.singleton(8)))) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IcmpTypeCodesApplication)) { return false; } IcmpTypeCodesApplication that = (IcmpTypeCodesApplication) o; return _type == that._type && _codes.equals(that._codes); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IcmpTypeCodesApplication)) { return false; } IcmpTypeCodesApplication that = (IcmpTypeCodesApplication) o; return _type == that._type && _codes.equals(that._codes); } }
IcmpTypeCodesApplication extends IcmpApplication { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IcmpTypeCodesApplication)) { return false; } IcmpTypeCodesApplication that = (IcmpTypeCodesApplication) o; return _type == that._type && _codes.equals(that._codes); } IcmpTypeCodesApplication(int type, int code);  IcmpTypeCodesApplication(int type, List<SubRange> codes); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IcmpTypeCodesApplication)) { return false; } IcmpTypeCodesApplication that = (IcmpTypeCodesApplication) o; return _type == that._type && _codes.equals(that._codes); } IcmpTypeCodesApplication(int type, int code);  IcmpTypeCodesApplication(int type, List<SubRange> codes); int getType(); @Nonnull List<SubRange> getCodes(); static boolean isValidTypeCode(int type, int code); @Override AclLineMatchExpr toAclLineMatchExpr(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override T accept(ApplicationVisitor<T> visitor); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof IcmpTypeCodesApplication)) { return false; } IcmpTypeCodesApplication that = (IcmpTypeCodesApplication) o; return _type == that._type && _codes.equals(that._codes); } IcmpTypeCodesApplication(int type, int code);  IcmpTypeCodesApplication(int type, List<SubRange> codes); int getType(); @Nonnull List<SubRange> getCodes(); static boolean isValidTypeCode(int type, int code); @Override AclLineMatchExpr toAclLineMatchExpr(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override T accept(ApplicationVisitor<T> visitor); static final SubRange ALL_CODES; static final Map<Integer, SubRange> VALID_TYPE_CODES; }