/** * Check whether a collection of AvroSchema objects contains a given AvroSchema element, resolving * UIDs using the given FijiSchemaTable. * * @param schemaTable FijiSchemaTable with which to resolve schema UIDs. * @param schemaCollection collection of AvroSchemas to check for the presence of the given * element. * @param element AvroSchema for whose presence to check in schemaCollection. * @return whether schemaCollection contains element after resolving UIDs using schemaTable. * @throws IOException in case of an error reading from the schema table. */ public static boolean avroSchemaCollectionContains( final FijiSchemaTable schemaTable, final Collection<AvroSchema> schemaCollection, final AvroSchema element ) throws IOException { for (AvroSchema schema : schemaCollection) { if (avroSchemaEquals(schemaTable, schema, element)) { return true; } } // If none match, return false. return false; }