class CommunityList extends CommunitySetExpr {

  @Override
  public boolean matchCommunity(@Nullable Environment environment, Community community) {
    if (dynamicMatchCommunity()) {
      if (environment == null) {
        throw new UnsupportedOperationException(
            "Supplied environment must not be null for a dynamic CommunityList");
      }
      return computeIfMatches(community, environment);
    }
    try {
      return _communityCache.get().get(community);
    } catch (ExecutionException | UncheckedExecutionException e) {
      throw new UnsupportedOperationException(
          "At least one line of this CommunityList has a match expression not supporting matchCommunity",
          e);
    }
  }

  public  CommunityList(
      @Nonnull String name, @Nonnull List<CommunityListLine> lines, boolean invertMatch);

}