test_class.file: openrtb-core/src/test/java/com/google/openrtb/util/OpenRtbUtilsTest.java
test_class.identifier: OpenRtbUtilsTest
test_case.body: @Test
    public void testAddFilter_specialCases() {
      Predicate<Imp> pred = imp -> true;
      assertThat(OpenRtbUtils.addFilters(pred, false, false, false)).isSameInstanceAs(pred);
      assertThat(OpenRtbUtils.addFilters(OpenRtbUtils.IMP_NONE, true, true, true))
          .isSameInstanceAs(OpenRtbUtils.IMP_NONE);
      assertThat(OpenRtbUtils.addFilters(OpenRtbUtils.IMP_ALL, true, true, true))
          .isNotSameInstanceAs(OpenRtbUtils.IMP_ALL);  // Mostly for coverage
    }
test_case.class_method_signature: OpenRtbUtilsTest.testAddFilter_specialCases()
test_case.full_signature: @Test public void testAddFilter_specialCases()
test_case.identifier: testAddFilter_specialCases
test_case.invocations: isSameInstanceAs assertThat addFilters isSameInstanceAs assertThat addFilters isNotSameInstanceAs assertThat addFilters
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddFilter_specialCases()
focal_class.declarator: SEAT_ANY = "*"
focal_class.modifier: public static final
focal_class.original_string: public static final String SEAT_ANY = "*";
focal_class.type: String
focal_class.var_name: SEAT_ANY
focal_class.declarator: IMP_NONE = imp -> false
focal_class.modifier: public static final
focal_class.original_string: public static final Predicate<Imp> IMP_NONE = imp -> false;
focal_class.type: Predicate<Imp>
focal_class.var_name: IMP_NONE
focal_class.declarator: IMP_ALL = imp -> true
focal_class.modifier: public static final
focal_class.original_string: public static final Predicate<Imp> IMP_ALL = imp -> true;
focal_class.type: Predicate<Imp>
focal_class.var_name: IMP_ALL
focal_class.declarator: CAT_TO_JSON
focal_class.modifier: private static final
focal_class.original_string: private static final ImmutableMap<Object, String> CAT_TO_JSON;
focal_class.type: ImmutableMap<Object, String>
focal_class.var_name: CAT_TO_JSON
focal_class.declarator: NAME_TO_CAT
focal_class.modifier: private static final
focal_class.original_string: private static final ImmutableMap<String, ContentCategory> NAME_TO_CAT;
focal_class.type: ImmutableMap<String, ContentCategory>
focal_class.var_name: NAME_TO_CAT
focal_class.file: openrtb-core/src/main/java/com/google/openrtb/util/OpenRtbUtils.java
focal_class.identifier: OpenRtbUtils
focal_class.class_method_signature: OpenRtbUtils.categoryFromName(@Nullable String catName)
focal_class.full_signature: @Nullable public static ContentCategory categoryFromName(@Nullable String catName)
focal_class.identifier: categoryFromName
focal_class.modifiers: @Nullable public static
focal_class.parameters: (@Nullable String catName)
focal_class.return: ContentCategory
focal_class.signature: ContentCategory categoryFromName(@Nullable String catName)
focal_class.class_method_signature: OpenRtbUtils.categoryToJsonName(@Nullable String catName)
focal_class.full_signature: @Nullable public static String categoryToJsonName(@Nullable String catName)
focal_class.identifier: categoryToJsonName
focal_class.modifiers: @Nullable public static
focal_class.parameters: (@Nullable String catName)
focal_class.return: String
focal_class.signature: String categoryToJsonName(@Nullable String catName)
focal_class.class_method_signature: OpenRtbUtils.categoryToJsonName(@Nullable ContentCategory cat)
focal_class.full_signature: @Nullable public static String categoryToJsonName(@Nullable ContentCategory cat)
focal_class.identifier: categoryToJsonName
focal_class.modifiers: @Nullable public static
focal_class.parameters: (@Nullable ContentCategory cat)
focal_class.return: String
focal_class.signature: String categoryToJsonName(@Nullable ContentCategory cat)
focal_class.class_method_signature: OpenRtbUtils.seatBid(BidResponse.Builder response, String seat)
focal_class.full_signature: public static SeatBid.Builder seatBid(BidResponse.Builder response, String seat)
focal_class.identifier: seatBid
focal_class.modifiers: public static
focal_class.parameters: (BidResponse.Builder response, String seat)
focal_class.return: SeatBid.Builder
focal_class.signature: SeatBid.Builder seatBid(BidResponse.Builder response, String seat)
focal_class.class_method_signature: OpenRtbUtils.seatBid(BidResponse.Builder response)
focal_class.full_signature: public static SeatBid.Builder seatBid(BidResponse.Builder response)
focal_class.identifier: seatBid
focal_class.modifiers: public static
focal_class.parameters: (BidResponse.Builder response)
focal_class.return: SeatBid.Builder
focal_class.signature: SeatBid.Builder seatBid(BidResponse.Builder response)
focal_class.class_method_signature: OpenRtbUtils.bids(BidResponse.Builder response)
focal_class.full_signature: public static Iterable<Bid.Builder> bids(BidResponse.Builder response)
focal_class.identifier: bids
focal_class.modifiers: public static
focal_class.parameters: (BidResponse.Builder response)
focal_class.return: Iterable<Bid.Builder>
focal_class.signature: Iterable<Bid.Builder> bids(BidResponse.Builder response)
focal_class.class_method_signature: OpenRtbUtils.bids(BidResponse.Builder response, @Nullable String seatFilter)
focal_class.full_signature: public static List<Bid.Builder> bids(BidResponse.Builder response, @Nullable String seatFilter)
focal_class.identifier: bids
focal_class.modifiers: public static
focal_class.parameters: (BidResponse.Builder response, @Nullable String seatFilter)
focal_class.return: List<Bid.Builder>
focal_class.signature: List<Bid.Builder> bids(BidResponse.Builder response, @Nullable String seatFilter)
focal_class.class_method_signature: OpenRtbUtils.bidWithId(BidResponse.Builder response, String id)
focal_class.full_signature: @Nullable public static Bid.Builder bidWithId(BidResponse.Builder response, String id)
focal_class.identifier: bidWithId
focal_class.modifiers: @Nullable public static
focal_class.parameters: (BidResponse.Builder response, String id)
focal_class.return: Bid.Builder
focal_class.signature: Bid.Builder bidWithId(BidResponse.Builder response, String id)
focal_class.class_method_signature: OpenRtbUtils.bidWithId(
        BidResponse.Builder response, @Nullable String seatFilter, String id)
focal_class.full_signature: @Nullable public static Bid.Builder bidWithId(
        BidResponse.Builder response, @Nullable String seatFilter, String id)
focal_class.identifier: bidWithId
focal_class.modifiers: @Nullable public static
focal_class.parameters: (
        BidResponse.Builder response, @Nullable String seatFilter, String id)
focal_class.return: Bid.Builder
focal_class.signature: Bid.Builder bidWithId(
        BidResponse.Builder response, @Nullable String seatFilter, String id)
focal_class.class_method_signature: OpenRtbUtils.bidStreamWith(
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.full_signature: public static Stream<Bid.Builder> bidStreamWith(
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.identifier: bidStreamWith
focal_class.modifiers: public static
focal_class.parameters: (
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.return: Stream<Bid.Builder>
focal_class.signature: Stream<Bid.Builder> bidStreamWith(
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.class_method_signature: OpenRtbUtils.bidsWith(
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.full_signature: public static Iterable<Bid.Builder> bidsWith(
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.identifier: bidsWith
focal_class.modifiers: public static
focal_class.parameters: (
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.return: Iterable<Bid.Builder>
focal_class.signature: Iterable<Bid.Builder> bidsWith(
        BidResponse.Builder response, @Nullable String seatFilter,
        @Nullable Predicate<Bid.Builder> bidFilter)
focal_class.class_method_signature: OpenRtbUtils.updateBids(
        BidResponse.Builder response, Function<Bid.Builder, Boolean> updater)
focal_class.full_signature: public static boolean updateBids(
        BidResponse.Builder response, Function<Bid.Builder, Boolean> updater)
focal_class.identifier: updateBids
focal_class.modifiers: public static
focal_class.parameters: (
        BidResponse.Builder response, Function<Bid.Builder, Boolean> updater)
focal_class.return: boolean
focal_class.signature: boolean updateBids(
        BidResponse.Builder response, Function<Bid.Builder, Boolean> updater)
focal_class.class_method_signature: OpenRtbUtils.updateBids(
        BidResponse.Builder response, @Nullable String seatFilter,
        Function<Bid.Builder, Boolean> updater)
focal_class.full_signature: public static boolean updateBids(
        BidResponse.Builder response, @Nullable String seatFilter,
        Function<Bid.Builder, Boolean> updater)
focal_class.identifier: updateBids
focal_class.modifiers: public static
focal_class.parameters: (
        BidResponse.Builder response, @Nullable String seatFilter,
        Function<Bid.Builder, Boolean> updater)
focal_class.return: boolean
focal_class.signature: boolean updateBids(
        BidResponse.Builder response, @Nullable String seatFilter,
        Function<Bid.Builder, Boolean> updater)
focal_class.class_method_signature: OpenRtbUtils.removeBids(BidResponse.Builder response, Predicate<Bid.Builder> filter)
focal_class.full_signature: public static boolean removeBids(BidResponse.Builder response, Predicate<Bid.Builder> filter)
focal_class.identifier: removeBids
focal_class.modifiers: public static
focal_class.parameters: (BidResponse.Builder response, Predicate<Bid.Builder> filter)
focal_class.return: boolean
focal_class.signature: boolean removeBids(BidResponse.Builder response, Predicate<Bid.Builder> filter)
focal_class.class_method_signature: OpenRtbUtils.removeBids(SeatBid.Builder seatbid, Predicate<Bid.Builder> filter)
focal_class.full_signature: private static boolean removeBids(SeatBid.Builder seatbid, Predicate<Bid.Builder> filter)
focal_class.identifier: removeBids
focal_class.modifiers: private static
focal_class.parameters: (SeatBid.Builder seatbid, Predicate<Bid.Builder> filter)
focal_class.return: boolean
focal_class.signature: boolean removeBids(SeatBid.Builder seatbid, Predicate<Bid.Builder> filter)
focal_class.class_method_signature: OpenRtbUtils.removeBids(
        BidResponse.Builder response, @Nullable String seatFilter, Predicate<Bid.Builder> bidFilter)
focal_class.full_signature: public static boolean removeBids(
        BidResponse.Builder response, @Nullable String seatFilter, Predicate<Bid.Builder> bidFilter)
focal_class.identifier: removeBids
focal_class.modifiers: public static
focal_class.parameters: (
        BidResponse.Builder response, @Nullable String seatFilter, Predicate<Bid.Builder> bidFilter)
focal_class.return: boolean
focal_class.signature: boolean removeBids(
        BidResponse.Builder response, @Nullable String seatFilter, Predicate<Bid.Builder> bidFilter)
focal_class.class_method_signature: OpenRtbUtils.impWithId(BidRequest request, String id)
focal_class.full_signature: @Nullable public static Imp impWithId(BidRequest request, String id)
focal_class.identifier: impWithId
focal_class.modifiers: @Nullable public static
focal_class.parameters: (BidRequest request, String id)
focal_class.return: Imp
focal_class.signature: Imp impWithId(BidRequest request, String id)
focal_class.class_method_signature: OpenRtbUtils.bannerImpWithId(
        BidRequest request, @Nullable String impId, String bannerId)
focal_class.full_signature: @Nullable public static Imp bannerImpWithId(
        BidRequest request, @Nullable String impId, String bannerId)
focal_class.identifier: bannerImpWithId
focal_class.modifiers: @Nullable public static
focal_class.parameters: (
        BidRequest request, @Nullable String impId, String bannerId)
focal_class.return: Imp
focal_class.signature: Imp bannerImpWithId(
        BidRequest request, @Nullable String impId, String bannerId)
focal_class.class_method_signature: OpenRtbUtils.impsWith(BidRequest request, Predicate<Imp> impFilter)
focal_class.full_signature: public static Iterable<Imp> impsWith(BidRequest request, Predicate<Imp> impFilter)
focal_class.identifier: impsWith
focal_class.modifiers: public static
focal_class.parameters: (BidRequest request, Predicate<Imp> impFilter)
focal_class.return: Iterable<Imp>
focal_class.signature: Iterable<Imp> impsWith(BidRequest request, Predicate<Imp> impFilter)
focal_class.class_method_signature: OpenRtbUtils.impStreamWith(BidRequest request, Predicate<Imp> impFilter)
focal_class.full_signature: public static Stream<Imp> impStreamWith(BidRequest request, Predicate<Imp> impFilter)
focal_class.identifier: impStreamWith
focal_class.modifiers: public static
focal_class.parameters: (BidRequest request, Predicate<Imp> impFilter)
focal_class.return: Stream<Imp>
focal_class.signature: Stream<Imp> impStreamWith(BidRequest request, Predicate<Imp> impFilter)
focal_class.class_method_signature: OpenRtbUtils.addFilters(
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)
focal_class.full_signature: public static Predicate<Imp> addFilters(
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)
focal_class.identifier: addFilters
focal_class.modifiers: public static
focal_class.parameters: (
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)
focal_class.return: Predicate<Imp>
focal_class.signature: Predicate<Imp> addFilters(
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)
focal_class.class_method_signature: OpenRtbUtils.filterSeat(SeatBidOrBuilder seatbid, @Nullable String seatFilter)
focal_class.full_signature: public static boolean filterSeat(SeatBidOrBuilder seatbid, @Nullable String seatFilter)
focal_class.identifier: filterSeat
focal_class.modifiers: public static
focal_class.parameters: (SeatBidOrBuilder seatbid, @Nullable String seatFilter)
focal_class.return: boolean
focal_class.signature: boolean filterSeat(SeatBidOrBuilder seatbid, @Nullable String seatFilter)
focal_method.body: public static Predicate<Imp> addFilters(
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ) {
      int orCount = (banner ? 1 : 0) + (video ? 1 : 0) + (nativ ? 1 : 0);
      if (baseFilter == IMP_NONE || orCount == 0) {
        return baseFilter;
      }
  
      Predicate<Imp> typeFilter = null;
      if (banner) {
        typeFilter = Imp::hasBanner;
      }
      if (video) {
        typeFilter = typeFilter == null ? Imp::hasVideo : typeFilter.or(Imp::hasVideo);
      }
      if (nativ) {
        typeFilter = typeFilter == null ? Imp::hasNative : typeFilter.or(Imp::hasNative);
      }
  
      return baseFilter == IMP_ALL ? typeFilter : baseFilter.and(typeFilter);
    }
focal_method.class_method_signature: OpenRtbUtils.addFilters(
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)
focal_method.full_signature: public static Predicate<Imp> addFilters(
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)
focal_method.identifier: addFilters
focal_method.invocations: or or and
focal_method.modifiers: public static
focal_method.parameters: (
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)
focal_method.return: Predicate<Imp>
focal_method.signature: Predicate<Imp> addFilters(
        Predicate<Imp> baseFilter, boolean banner, boolean video, boolean nativ)