Package org.spongepowered.asm.mixin.transformer.struct

## Class InsnRange

- java.lang.Object
- - org.spongepowered.asm.mixin.transformer.struct.InsnRange

    public class InsnRange
    extends java.lang.Object

Struct for representing a range of instructions

### Field Summary

Fields
`int` `end` End of the range (line number)
`int` `marker` Range marker (index of insn)
`int` `start` Start of the range (line number)

### Constructor Summary

Constructors
`InsnRange​(int start, int end, int marker)` Create a range with the specified values.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.util.Deque<org.objectweb.asm.tree.AbstractInsnNode>` `apply​(org.objectweb.asm.tree.InsnList insns, boolean inclusive)` Apply this range to the specified insn list
`boolean` `contains​(int value)` Returns true if the supplied value is between or equal to start and end
`boolean` `excludes​(int value)` Returns true if the supplied value is outside the range
`boolean` `isValid()` Range is valid if both start and end are nonzero and end is after or at start
`java.lang.String` `toString()`

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

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

### Field Detail

#### start

    public final int start

Start of the range (line number)

#### end

    public final int end

End of the range (line number)

#### marker

    public final int marker

Range marker (index of insn)

### Constructor Detail

#### InsnRange

    public InsnRange​(int start,
                     int end,
                     int marker)

Create a range with the specified values.

Parameters:
  `start` - Start of the range
  `end` - End of the range
  `marker` - Arbitrary marker value

### Method Detail

#### isValid

    public boolean isValid()

Range is valid if both start and end are nonzero and end is after or at start

Returns:
  true if valid

#### contains

    public boolean contains​(int value)

Returns true if the supplied value is between or equal to start and end

Parameters:
  `value` - true if the range contains value

#### excludes

    public boolean excludes​(int value)

Returns true if the supplied value is outside the range

Parameters:
  `value` - true if the range does not contain value

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### apply

    public java.util.Deque<org.objectweb.asm.tree.AbstractInsnNode> apply​(org.objectweb.asm.tree.InsnList insns,
                                                                          boolean inclusive)

Apply this range to the specified insn list

Parameters:
  `insns` - insn list to filter
  `inclusive` - whether to include or exclude instructions
Returns:
  filtered list