@Test public void testParameters() { Map<String, String> expectedParameters = new HashMap<>(); expectedParameters.put("foo", "val"); expectedParameters.put("bar", "baz"); Schema schema = SchemaBuilder.string().parameter("foo", "val").parameter("bar", "baz").build(); assertTypeAndDefault(schema, Schema.Type.STRING, false, null); assertMetadata(schema, null, null, null, expectedParameters); schema = SchemaBuilder.string().parameters(expectedParameters).build(); assertTypeAndDefault(schema, Schema.Type.STRING, false, null); assertMetadata(schema, null, null, null, expectedParameters); }
@Override public Map<String, String> parameters() { return parameters == null ? null : Collections.unmodifiableMap(parameters); }
SchemaBuilder implements Schema { @Override public Map<String, String> parameters() { return parameters == null ? null : Collections.unmodifiableMap(parameters); } }
SchemaBuilder implements Schema { @Override public Map<String, String> parameters() { return parameters == null ? null : Collections.unmodifiableMap(parameters); } SchemaBuilder(Type type); }
SchemaBuilder implements Schema { @Override public Map<String, String> parameters() { return parameters == null ? null : Collections.unmodifiableMap(parameters); } SchemaBuilder(Type type); @Override boolean isOptional(); SchemaBuilder optional(); SchemaBuilder required(); @Override Object defaultValue(); SchemaBuilder defaultValue(Object value); @Override String name(); SchemaBuilder name(String name); @Override Integer version(); SchemaBuilder version(Integer version); @Override String doc(); SchemaBuilder doc(String doc); @Override Map<String, String> parameters(); SchemaBuilder parameter(String propertyName, String propertyValue); SchemaBuilder parameters(Map<String, String> props); @Override Type type(); static SchemaBuilder type(Type type); static SchemaBuilder int8(); static SchemaBuilder int16(); static SchemaBuilder int32(); static SchemaBuilder int64(); static SchemaBuilder float32(); static SchemaBuilder float64(); static SchemaBuilder bool(); static SchemaBuilder string(); static SchemaBuilder bytes(); static SchemaBuilder struct(); SchemaBuilder field(String fieldName, Schema fieldSchema); List<Field> fields(); Field field(String fieldName); static SchemaBuilder array(Schema valueSchema); static SchemaBuilder map(Schema keySchema, Schema valueSchema); @Override Schema keySchema(); @Override Schema valueSchema(); Schema build(); @Override Schema schema(); }
SchemaBuilder implements Schema { @Override public Map<String, String> parameters() { return parameters == null ? null : Collections.unmodifiableMap(parameters); } SchemaBuilder(Type type); @Override boolean isOptional(); SchemaBuilder optional(); SchemaBuilder required(); @Override Object defaultValue(); SchemaBuilder defaultValue(Object value); @Override String name(); SchemaBuilder name(String name); @Override Integer version(); SchemaBuilder version(Integer version); @Override String doc(); SchemaBuilder doc(String doc); @Override Map<String, String> parameters(); SchemaBuilder parameter(String propertyName, String propertyValue); SchemaBuilder parameters(Map<String, String> props); @Override Type type(); static SchemaBuilder type(Type type); static SchemaBuilder int8(); static SchemaBuilder int16(); static SchemaBuilder int32(); static SchemaBuilder int64(); static SchemaBuilder float32(); static SchemaBuilder float64(); static SchemaBuilder bool(); static SchemaBuilder string(); static SchemaBuilder bytes(); static SchemaBuilder struct(); SchemaBuilder field(String fieldName, Schema fieldSchema); List<Field> fields(); Field field(String fieldName); static SchemaBuilder array(Schema valueSchema); static SchemaBuilder map(Schema keySchema, Schema valueSchema); @Override Schema keySchema(); @Override Schema valueSchema(); Schema build(); @Override Schema schema();  }