Tuple implements Fields<String> { @Override public int size () { int s = values.size(); for ( int i = 0; i < schema.getFieldCount(); i++ ) { if ( values.get( i ) == null ) { s--; } } return s; } 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 shouldGetNonExistingMapOrEmpty () { final Tuple tuple = new Tuple(); assertThat( tuple.getMapOrEmpty( "field" ).size(), equalTo( 0 ) ); }