@Test public void testCanQuery() { IpAccessList acl = IpAccessList.builder() .setName("acl") .setLines(ImmutableList.of(ExprAclLine.ACCEPT_ALL)) .build(); MatchLineQuery matchLine0 = new MatchLineQuery(0); MatchLineQuery matchLine1 = new MatchLineQuery(1); assertTrue(matchLine0.canQuery(acl)); assertFalse(matchLine1.canQuery(acl)); }
@Override public boolean canQuery(IpAccessList acl) { return acl.getLines().size() > _lineNum; }
MatchLineQuery implements SearchFiltersQuery { @Override public boolean canQuery(IpAccessList acl) { return acl.getLines().size() > _lineNum; } }
MatchLineQuery implements SearchFiltersQuery { @Override public boolean canQuery(IpAccessList acl) { return acl.getLines().size() > _lineNum; } MatchLineQuery(int lineNum); }
MatchLineQuery implements SearchFiltersQuery { @Override public boolean canQuery(IpAccessList acl) { return acl.getLines().size() > _lineNum; } MatchLineQuery(int lineNum); int getLineNum(); @Override boolean canQuery(IpAccessList acl); @Override @Nonnull BDD getMatchingBdd(IpAccessList acl, IpAccessListToBdd ipAccessListToBdd, BDDPacket pkt); }
MatchLineQuery implements SearchFiltersQuery { @Override public boolean canQuery(IpAccessList acl) { return acl.getLines().size() > _lineNum; } MatchLineQuery(int lineNum); int getLineNum(); @Override boolean canQuery(IpAccessList acl); @Override @Nonnull BDD getMatchingBdd(IpAccessList acl, IpAccessListToBdd ipAccessListToBdd, BDDPacket pkt);  }