/** * Returns the {@link Type} of this tuple. It will never be a {@link Type#RECORD_TUPLE} or a * {@link Type#UNKNOWN_TUPLE}. See {@link #classify(Tuple)} for full classification. * * @param tuple The tuple whose type is needed. * @return An {@link Optional} {@link Type} for the tuple. */ public Optional<Type> classifyInternalTypes(Tuple tuple) { return INTERNAL_TYPES.stream().filter(x -> x.isMe(tuple)).findFirst(); } }
/** * Returns the {@link Type} of this tuple. It will never be a {@link Type#RECORD_TUPLE} or a * {@link Type#UNKNOWN_TUPLE}. See {@link #classify(Tuple)} for full classification. * * @param tuple The tuple whose type is needed. * @return An {@link Optional} {@link Type} for the tuple. */ public Optional<Type> classifyInternalTypes(Tuple tuple) { return INTERNAL_TYPES.stream().filter(x -> x.isMe(tuple)).findFirst(); } }