a collector that takes a stream containing exactly one element and returns that element . the returned collector throws an illegalargumentexception if the stream consists of two ormore elements , and a nosuchelementexception if the stream is empty . concode_field_sep Collector<Object,?,Optional<Object>> TO_OPTIONAL concode_elem_sep Object NULL_PLACEHOLDER concode_elem_sep Collector<Object,?,Object> ONLY_ELEMENT concode_elem_sep int MAX_EXTRAS concode_elem_sep List<Object> extras concode_elem_sep Object element concode_field_sep void add concode_elem_sep Optional<Object> getOptional concode_elem_sep Collector<T,?,Optional<T>> toOptional concode_elem_sep Object getElement concode_elem_sep IllegalArgumentException multiples concode_elem_sep ToOptionalState combine
Collector < T , ? , T > function ( ) { return ( Collector ) ONLY_ELEMENT ; }