@Test public void serialisation() { Tuple person = personSchema.makeWith("Dominic", 41, addressSchema.makeWith(asList("23 Acacia Avenue", "Sunderland"), "VB6 5UX")); assertThat(person.serialise(Object::toString), equalTo(ImmutableMap.of( "name", "Dominic", "age", "41", "address", "address{addressLines=[23 Acacia Avenue, Sunderland], postcode=VB6 5UX}"))); }
public <V> Map<String, V> serialise(Function<Object, V> serialiser) { return schema.serialise(serialiser, values); }
Tuple { public <V> Map<String, V> serialise(Function<Object, V> serialiser) { return schema.serialise(serialiser, values); } }
Tuple { public <V> Map<String, V> serialise(Function<Object, V> serialiser) { return schema.serialise(serialiser, values); } Tuple(TupleSchema schema, Object[] values); }
Tuple { public <V> Map<String, V> serialise(Function<Object, V> serialiser) { return schema.serialise(serialiser, values); } Tuple(TupleSchema schema, Object[] values); Object get(String name); T get(TupleKey<T> key); Map<String, V> serialise(Function<Object, V> serialiser); Map<String, Object> toMap(); TupleSchema getSchema(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Tuple { public <V> Map<String, V> serialise(Function<Object, V> serialiser) { return schema.serialise(serialiser, values); } Tuple(TupleSchema schema, Object[] values); Object get(String name); T get(TupleKey<T> key); Map<String, V> serialise(Function<Object, V> serialiser); Map<String, Object> toMap(); TupleSchema getSchema(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }