Package org.spongepowered.asm.mixin.injection.selectors

## Class TargetSelector.Result<TNode>

- java.lang.Object
- - org.spongepowered.asm.mixin.injection.selectors.TargetSelector.Result<TNode>

Type Parameters:
  `TNode` - Node type

Enclosing class:
  TargetSelector

    public static class TargetSelector.Result<TNode>
    extends java.lang.Object

Query result struct

### Field Summary

Fields
`java.util.List<ElementNode<TNode>>` `candidates` All candidates returned by the query
`ElementNode<TNode>` `exactMatch` Any exact match returned by the query

### Method Summary

All Methods Instance Methods Concrete Methods
`TNode` `getSingleResult​(boolean strict)` Get only a single result from this handle.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### exactMatch

    public final ElementNode<TNode> exactMatch

Any exact match returned by the query

#### candidates

    public final java.util.List<ElementNode<TNode>> candidates

All candidates returned by the query

### Method Detail

#### getSingleResult

    public TNode getSingleResult​(boolean strict)

Get only a single result from this handle. Preferentially returns an exact match if one was found, or returns the first result if only one result was found or if `strict` is `false`. If `strict` is `true` and more than one candidate was found, a `IllegalStateException` is thrown. If no results are found then the exception is also thrown.

Parameters:
  `strict` - True to only return the first (non-exact) result if exactly one result was found. If more than one candidate was found, throws `IllegalStateException`