StormTuple implements backtype.storm.tuple.Tuple { @Override public Boolean getBooleanByField(final String field) { return getValueByName(field); } StormTuple(final IN flinkTuple, final Fields schema, final int producerTaskId, final String producerStreamId, final String producerComponentId, final MessageId messageId); @Override int size(); @Override boolean contains(final String field); @Override Fields getFields(); @Override int fieldIndex(final String field); @Override List<Object> select(final Fields selector); @Override Object getValue(final int i); @Override String getString(final int i); @Override Integer getInteger(final int i); @Override Long getLong(final int i); @Override Boolean getBoolean(final int i); @Override Short getShort(final int i); @Override Byte getByte(final int i); @Override Double getDouble(final int i); @Override Float getFloat(final int i); @Override byte[] getBinary(final int i); @SuppressWarnings("unchecked") T getValueByName(final String field); @Override Object getValueByField(final String field); @Override String getStringByField(final String field); @Override Integer getIntegerByField(final String field); @Override Long getLongByField(final String field); @Override Boolean getBooleanByField(final String field); @Override Short getShortByField(final String field); @Override Byte getByteByField(final String field); @Override Double getDoubleByField(final String field); @Override Float getFloatByField(final String field); @Override byte[] getBinaryByField(final String field); @Override List<Object> getValues(); @Override GlobalStreamId getSourceGlobalStreamid(); @Override String getSourceComponent(); @Override int getSourceTask(); @Override String getSourceStreamId(); @Override MessageId getMessageId(); @Override int hashCode(); @SuppressWarnings("rawtypes") @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testGetBooleanByField() throws Exception { Boolean value = r.nextBoolean(); StormTuple<?> tuple = testGetByField(arity, index, value); Assert.assertEquals(value, tuple.getBooleanByField(fieldName)); }
@Test public void testGetBooleanByFieldPojo() throws Exception { Boolean value = r.nextBoolean(); TestPojoMember<Boolean> pojo = new TestPojoMember<Boolean>(value); StormTuple<TestPojoMember<Boolean>> tuple = new StormTuple<TestPojoMember<Boolean>>(pojo, null, -1, null, null, null); Assert.assertSame(value, tuple.getBooleanByField(fieldNamePojo)); }
@Test public void testGetBooleanByFieldPojoGetter() throws Exception { Boolean value = r.nextBoolean(); TestPojoGetter<Boolean> pojo = new TestPojoGetter<Boolean>(value); StormTuple<TestPojoGetter<Boolean>> tuple = new StormTuple<TestPojoGetter<Boolean>>(pojo, null, -1, null, null, null); Assert.assertSame(value, tuple.getBooleanByField(fieldNamePojo)); }