Single is the operation that returns single object from the sequence or throws an exception if the sequence contains more or less elements.
Syntax
First
: 'single' '(' LambdaExpression? ')'
;
Related tokens
[LambdaExpression](../expression/lambda)
Single examples
Find a table cell with the text 'Alex'. Throws when not found or more than one record returns.
select(tableCells) // PdfTableCell[]
->single((item) => item.Text() == 'Alex') // PdfTableCell