# Interface: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICIfStm

C AST interface to represent a conditional "if" statement. 

 An if\-statement consists of one or more branches \(if, else\-if\) followed by an optional default branch \(else\) block. 

 Example:  

```

 if(p)
   b
 else if(p1)
   b1
 else
   b2
 
```

## Method: addBranch
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICPredicate`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`

Description: Add an alternative block \(if or else\-if\) to this element.
parameter: p: mandatory predicate
parameter: b: mandatory statement

## Method: duplicate
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICIfStm`


## Method: getBranchBody
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`


## Method: getBranchPredicate
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICPredicate`


## Method: getBranchPredicates
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICPredicate>`

Description: Get the predicates. Warning, this is the actual list of predicates, not a copy. Caution should be exercised when modifying it
return: the original list of predicates

## Method: insertBranch
- parameter: `index`, type: `int`
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICPredicate`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`


## Method: removeBranch
- parameter: `index`, type: `int`


## Method: removeDefaultBlock
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`

Description: Remove the default block, if there one, and return it.
return: the default block \(null if there was none\)

## Method: setBranchBody
- parameter: `index`, type: `int`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`


## Method: setBranchPredicate
- parameter: `index`, type: `int`
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICPredicate`


## Method: setDefaultBlock
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`


