Jindent - Java Source Code Formatter http://www.jindent.com
 



title
5.6.1.10.6 Ternary Conditions

Align first ternary expression to ternary condition

Align first ternary expression to ternary condition

Enables alignment of first ternary expressions to its corresponding condition.


Align first ternary expression to its condition:

beta = (x >= 0)                         
       ? alpha                          
       : gamma;                         

Setting "Align second ternary expression to first one" is enabled.


Do not align first ternary expression to its condition:

beta = (x >= 0) ? alpha                 
                : gamma;                

Setting "Align second ternary expression to first one" is enabled.


Align first ternary expression to its condition but setting "Align second ternary expression to first one" is disabled now.

beta = (x >= 0)                         
       ? alpha : gamma;                 



Do not align first ternary expression to its condition and setting "Align second ternary expression to first one" is disabled again:

beta = (x >= 0) ? alpha : gamma;        


See also... See also: Align second ternary expression to first one




Align second ternary expression to first one

Align second ternary expression to first one

Aligns second ternay expression to first one.

For examples about alignments of ternary expressions please refer to setting "Align first ternary expression to ternary condition"


See also... See also: Align first ternary expression to ternary condition