if (firstLong != null) {
final Double secondDouble = msg.getDouble("secondDouble");
if (secondDouble != null) {
return LongDoublePair.of(firstLong.longValue(), secondDouble.doubleValue());
} else {
final FudgeField secondField = msg.getByName(SECOND_FIELD_NAME);
final Object second = secondField != null ? deserializer.fieldValueToObject(secondField) : null;
return LongObjectPair.of(firstLong.longValue(), second);
}
}
final Long firstInt = msg.getLong("firstInt");
if (firstInt != null) {
final Double secondDouble = msg.getDouble("secondDouble");
if (secondDouble != null) {
return IntDoublePair.of(firstInt.intValue(), secondDouble.doubleValue());
} else {
final FudgeField secondField = msg.getByName(SECOND_FIELD_NAME);
final Object second = secondField != null ? deserializer.fieldValueToObject(secondField) : null;
return IntObjectPair.of(firstInt.intValue(), second);
}
}
final Double firstDouble = msg.getDouble("firstDouble");
final Double secondDouble = msg.getDouble("secondDouble");
if (firstDouble != null && secondDouble != null) {
return DoublesPair.of(firstDouble.doubleValue(), secondDouble.doubleValue());
}
final FudgeField firstField = msg.getByName(FIRST_FIELD_NAME);
final Object first = firstField != null ? deserializer.fieldValueToObject(firstField) : null;
final FudgeField secondField = msg.getByName(SECOND_FIELD_NAME);
final Object second = secondField != null ? deserializer.fieldValueToObject(secondField) : null;
return ObjectsPair.of(first, second);
}