Tuple implements Fields<String> { public static Tuple of ( final String key, final Object val ) { return of( EMPTY_SCHEMA, key, val ); } Tuple();  Tuple( final TupleSchema schema ); private  Tuple( final TupleSchema schema,
                    final ArrayList<Object> values,
                    final long ingestionTime,
                    final List<Triple<String, Boolean, Long>> latencyRecs ); static Tuple of( final String key, final Object val ); static Tuple of( final String key1, final Object val1, final String key2, final Object val2 ); static Tuple of( final String key1,
                             final Object val1,
                             final String key2,
                             final Object val2,
                             final String key3,
                             final Object val3 ); static Tuple of( final String key1,
                             final Object val1,
                             final String key2,
                             final Object val2,
                             final String key3,
                             final Object val3,
                             final String key4,
                             final Object val4 ); static Tuple of( final String key1,
                             final Object val1,
                             final String key2,
                             final Object val2,
                             final String key3,
                             final Object val3,
                             final String key4,
                             final Object val4,
                             final String key5,
                             final Object val5 ); static Tuple of( final TupleSchema schema, final String key, final Object val ); static Tuple of( final TupleSchema schema, final String key1, final Object val1, final String key2, final Object val2 ); static Tuple of( final TupleSchema schema,
                             final String key1,
                             final Object val1,
                             final String key2,
                             final Object val2,
                             final String key3,
                             final Object val3 ); static Tuple of( final TupleSchema schema,
                             final String key1,
                             final Object val1,
                             final String key2,
                             final Object val2,
                             final String key3,
                             final Object val3,
                             final String key4,
                             final Object val4 ); static Tuple of( final TupleSchema schema,
                             final String key1,
                             final Object val1,
                             final String key2,
                             final Object val2,
                             final String key3,
                             final Object val3,
                             final String key4,
                             final Object val4,
                             final String key5,
                             final Object val5 ); @SuppressWarnings( "unchecked" ) @Override T get( final String key ); T getAtSchemaIndex( final int i ); @Override boolean contains( final String key ); @Override Tuple set( final String key, final Object value ); void setAtSchemaIndex( final int i, final Object value ); @Override T remove( final String key ); @Override boolean delete( final String key ); void sinkTo( final BiConsumer<String, Object> consumer ); @Override void clear(); @Override int size(); TupleSchema getSchema(); void attachTo( final Tuple source ); Tuple shallowCopy(); @Override boolean equals( final Object o ); @Override int hashCode(); @Override String toString();  }
@Test public void shouldSet () { final Tuple tuple = Tuple.of( "field", "value" ); assertThat( tuple.getObject( "field" ), equalTo( "value" ) ); }
@Test public void shouldGetExistingOrDefault () { final Tuple tuple = Tuple.of( "field", "value" ); assertThat( tuple.getOrDefault( "field", "value2" ), equalTo( "value" ) ); }
@Test public void shouldGetExistingObject () { final Tuple tuple = Tuple.of( "field", "value" ); assertThat( tuple.getObject( "field" ), equalTo( "value" ) ); }
@Test public void shouldGetExistingObjectOrDefault () { final Tuple tuple = Tuple.of( "field", "value" ); assertThat( tuple.getObjectOrDefault( "field", "value2" ), equalTo( "value" ) ); }
@Test public void shouldGetExistingString () { final Tuple tuple = Tuple.of( "field", "value" ); assertThat( tuple.getString( "field" ), equalTo( "value" ) ); }
@Test public void shouldGetExistingStringOrDefault () { final Tuple tuple = Tuple.of( "field", "value" ); assertThat( tuple.getStringOrDefault( "field", "value2" ), equalTo( "value" ) ); }
@Test public void shouldGetExistingInteger () { final Tuple tuple = Tuple.of( "field", 1 ); assertThat( tuple.getInteger( "field" ), equalTo( 1 ) ); }
@Test public void shouldGetExistingIntegerOrDefault () { final Tuple tuple = Tuple.of( "field", 1 ); assertThat( tuple.getIntegerOrDefault( "field", 2 ), equalTo( 1 ) ); }
@Test public void shouldGetExistingLong () { final Tuple tuple = Tuple.of( "field", 1L ); assertThat( tuple.getLong( "field" ), equalTo( 1L ) ); }
@Test public void shouldGetExistingLongOrDefault () { final Tuple tuple = Tuple.of( "field", 1L ); assertThat( tuple.getLongOrDefault( "field", 2L ), equalTo( 1L ) ); }
@Test public void shouldGetExistingBoolean () { final Tuple tuple = Tuple.of( "field", Boolean.TRUE ); assertTrue( tuple.getBoolean( "field" ) ); }
@Test public void shouldGetExistingBooleanOrDefault () { final Tuple tuple = Tuple.of( "field", Boolean.TRUE ); assertTrue( tuple.getBooleanOrDefault( "field", Boolean.FALSE ) ); }
@Test public void shouldGetGetExistingShort () { final short val = 1; final Tuple tuple = Tuple.of( "field", val ); assertThat( tuple.getShort( "field" ), equalTo( val ) ); }
@Test public void shouldGetExistingShortOrDefault () { final short val = 1; final Tuple tuple = Tuple.of( "field", val ); final short other = 2; assertThat( tuple.getShortOrDefault( "field", other ), equalTo( val ) ); }
@Test public void shouldGetExistingByte () { final byte val = 1; final Tuple tuple = Tuple.of( "field", val ); assertThat( tuple.getByte( "field" ), equalTo( val ) ); }
@Test public void shouldGetExistingByteOrDefault () { final byte val = 1; final byte other = 1; final Tuple tuple = Tuple.of( "field", val ); assertThat( tuple.getByteOrDefault( "field", other ), equalTo( val ) ); }
@Test public void shouldGetExistingDouble () { final Tuple tuple = Tuple.of( "field", 1d ); assertThat( tuple.getDouble( "field" ), equalTo( 1d ) ); }
@Test public void shouldGetExistingDoubleOrDefault () { final Tuple tuple = Tuple.of( "field", 1d ); assertThat( tuple.getDoubleOrDefault( "field", 2d ), equalTo( 1d ) ); }
@Test public void shouldGetExistingFloat () { final Tuple tuple = Tuple.of( "field", 1f ); assertThat( tuple.getFloat( "field" ), equalTo( 1f ) ); }
@Test public void shouldGetExistingFloatOrDefault () { final Tuple tuple = Tuple.of( "field", 1f ); assertThat( tuple.getFloatOrDefault( "field", 2f ), equalTo( 1f ) ); }
@Test public void shouldGetExistingBinary () { final byte[] val = new byte[] { 1 }; final Tuple tuple = Tuple.of( "field", val ); assertThat( tuple.getBinary( "field" ), equalTo( val ) ); }
@Test public void shouldGetExistingBinaryOrDefault () { final byte[] val = new byte[] { 1 }; final Tuple tuple = Tuple.of( "field", val ); assertThat( tuple.getBinaryOrDefault( "field", new byte[] {} ), equalTo( val ) ); }
@Test public void shouldGetExistingCollection () { final Collection<Integer> value = makeArrayList(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getCollection( "field" ), equalTo( value ) ); }
@Test public void shouldGetExistingCollectionOrDefault () { final Collection<Integer> value = makeArrayList(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getCollectionOrDefault( "field", Collections.emptyList() ), equalTo( value ) ); }
@Test public void shouldGetExistingCollectionOrEmpty () { final Collection<Integer> value = makeArrayList(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getCollectionOrEmpty( "field" ), equalTo( value ) ); }
@Test public void shouldGetExistingList () { final List<Integer> value = makeArrayList(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getList( "field" ), equalTo( value ) ); }
@Test public void shouldGetExistingListOrDefault () { final List<Integer> value = makeArrayList(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getListOrDefault( "field", Collections.emptyList() ), equalTo( value ) ); }
@Test public void shouldGetExistingListOrEmpty () { final List<Integer> value = makeArrayList(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getListOrEmpty( "field" ), equalTo( value ) ); }
@Test public void shouldGetExistingSet () { final Set<Integer> value = makeHashSet(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getSet( "field" ), equalTo( value ) ); }
@Test public void shouldGetExistingSetOrDefault () { final Set<Integer> value = makeHashSet(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getSetOrDefault( "field", Collections.emptySet() ), equalTo( value ) ); }
@Test public void shouldGetExistingSetOrEmpty () { final Set<Integer> value = makeHashSet(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getSetOrEmpty( "field" ), equalTo( value ) ); }
@Test public void shouldGetExistingMap () { final Map<Integer, Integer> value = makeHashMap(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getMap( "field" ), equalTo( value ) ); }
@Test public void shouldGetExistingMapOrDefault () { final Map<Integer, Integer> value = makeHashMap(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getMapOrDefault( "field", Collections.emptyMap() ), equalTo( value ) ); }
@Test public void shouldGetExistingMapOrEmpty () { final Map<Integer, Integer> value = makeHashMap(); final Tuple tuple = Tuple.of( "field", value ); assertThat( tuple.getMapOrEmpty( "field" ), equalTo( value ) ); }