public Optional < DistinctSelectItem > getDistinctSelectItem ( ) { for ( SelectItem each : items ) { if ( each instanceof DistinctSelectItem ) { return Optional . of ( ( DistinctSelectItem ) each ) ; } } return Optional . absent ( ) ; }
Get distinct select item optional .