@Test public void checkRecordTypeAllValueTest() { Set<String> set = Collections.singleton(RecordType.ALL.name()); boolean result = CheckTransforms.checkRecordType(set, RecordType.BASIC, RecordType.AUDUBON); Assert.assertTrue(result); }
public static boolean checkRecordType(Set<String> types, InterpretationType... type) { boolean matchType = Arrays.stream(type).anyMatch(x -> types.contains(x.name())); boolean all = Arrays.stream(type).anyMatch(x -> types.contains(x.all())); return all || matchType; }
CheckTransforms extends PTransform<PCollection<T>, PCollection<T>> { public static boolean checkRecordType(Set<String> types, InterpretationType... type) { boolean matchType = Arrays.stream(type).anyMatch(x -> types.contains(x.name())); boolean all = Arrays.stream(type).anyMatch(x -> types.contains(x.all())); return all || matchType; } }
CheckTransforms extends PTransform<PCollection<T>, PCollection<T>> { public static boolean checkRecordType(Set<String> types, InterpretationType... type) { boolean matchType = Arrays.stream(type).anyMatch(x -> types.contains(x.name())); boolean all = Arrays.stream(type).anyMatch(x -> types.contains(x.all())); return all || matchType; }  }
CheckTransforms extends PTransform<PCollection<T>, PCollection<T>> { public static boolean checkRecordType(Set<String> types, InterpretationType... type) { boolean matchType = Arrays.stream(type).anyMatch(x -> types.contains(x.name())); boolean all = Arrays.stream(type).anyMatch(x -> types.contains(x.all())); return all || matchType; }  @Override PCollection<T> expand(PCollection<T> input); static boolean checkRecordType(Set<String> types, InterpretationType... type); }
CheckTransforms extends PTransform<PCollection<T>, PCollection<T>> { public static boolean checkRecordType(Set<String> types, InterpretationType... type) { boolean matchType = Arrays.stream(type).anyMatch(x -> types.contains(x.name())); boolean all = Arrays.stream(type).anyMatch(x -> types.contains(x.all())); return all || matchType; }  @Override PCollection<T> expand(PCollection<T> input); static boolean checkRecordType(Set<String> types, InterpretationType... type);  }