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



title
5.6.1.9.3 Declarations

Maximal gap size of indentations for multiple variable and field declarations

Maximal gap size of indentations for multiple
	variable and field declarations

Detects big gaps in field and local variable declarations caused by line wrapping and reindents these declarations again with a smaller indentation size.

Please note: This setting is similiar to "Maximal gap size of indentations" but in this case its use is just related to formatting of local variable and field declarations.



An example describes the definition of 'big gap'. We assume a line wrapping result like this:

public class MyConstants                                                      |
{                                                                             |
    
public static final String constantOne   = "Some text here ...",          |
|-----------------------------|
constantTwo   = "Some other text...",          |
                               
constantThree = getTextFromMethod(             |
                                                   
parameterA, paramterB),    |
                               
constantFour  = "bla bla ...";                 |
}                                                                             |

The example above shows a correct line wrapping. 'constantTwo' is aligned to 'constantOne' and so on. Even if this is a correct alignment the big gap appearing between left margin and 'constantTwo' does not look pretty.

To handle this problem we introduce two gap size measures:


Now one of these two measurements can be used to detect 'big gaps' in source codes. If a big gap is found then Jindent uses the value from setting: "General indentation size" to reindent this source code again.


An example explains the algorithm:

We assume setting "General indentation size" is set to 4.
Setting "Maximal gap size of indentations for multiple variable and field declarations" is using a 'relative' detection mode for big gaps and the maximal allowed size of these gaps is 25.

Now Jindent would procced the following steps:


Use setting infinite to leave gaps untouched.

Use setting 0 and Jindent will always use "General indentation size" to indent all variable and field declarations.

See also... See also: Maximal gap size of indentations , Align assignments




Wrap initializers of variable and field declarations to right side (in this case the 'maximal gap settings' will be ignored)

Wrap initializers of variable and field declarations to right side
	(in this case the 'maximal gap settings' will be ignored)

Controls whether line wrapping of variable or field initializers are proceed to the right side of assignment or not.


Do not wrap initializers to right side:

LongClassName tmp;                                          |
String        stringValue1 = "some text here ...";          |
String        stringValue2 = getTextFromMethod(             |
    
parameter1, parameter2);                                |



Wrap initializers to right side:

LongClassName tmp;                                          |
String        stringValue1 = "some text here ...";          |
String        stringValue2 = getTextFromMethod(             |
                                 
parameter1, parameter2);   |


Please note:In this case the setting overwrites the functionality of: "Maximal gap size of indentations"


Wrap before extends

Wrap before extends

Controls how to wrap token extends.


Wrap always and indent by 4 white spaces:

public class MyClass                    
    
extends AnotherClass {              
                                        
    ...                                 
}                                       

This wrapping mode wraps always token extends to a new line even if it would fit into the specified maximal line length.
The wrapped token extends is indented by setting: "Indentation of wrapped extends"


Wrap never :

public class MyClass extends AnotherClass {
    ...                                 
}                                       

This wrapping mode never wraps token extends to a new line even if it does not fit into the specified maximal line length.


Wrap on demand and indent by 0 white spaces:

public class MyClass               |
extends AnotherClass {             |
    
...                            |
}                                  |

This wrapping mode wraps token extends on demand:
If extends fits into the specified maximal line length then the token won't be wrapped. If it exceeds maximal line length it will be wrapped to a new line though. The wrapped token will be indented by setting: "Indentation of wrapped extends"


Wrapping mode if line exceeds works a bit different:
If the line where token extends belongs to exceeds maximal line length then extends will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public class MyClass extends AnotherClass implements MyInterface {
    ...
                                                     |
}                                                           |

In this example token extends does not exceed the specified maximal line length, but another token MyInterface does. We consider this case as 'the line exceeds maximal line length' and therefore token extends will be wrapped and indented by setting: "Indentation of wrapped extends"

public class MyClass                                        |
    
extends AnotherClass implements MyInterface {           |
    
...                                                     |
}                                                           |


See also... See also: Indentation of wrapped extends




Indentation of wrapped extends

Indentation of wrapped extends

Indents wrapped token extends by a specified number of white spaces.

See also... See also: Wrap before extends




Wrap extended classes

Wrap extended classes

Controls how to wrap extended class/interface names.


Wrap always:

public interface MyInterfaces extends InterfaceOne,
                                      InterfaceTwo,

                                      InterfaceThree {

                                        
    ...                                 
}                                       

This wrapping mode wraps always extended class/interface names to a new line even if they fit into the specified maximal line length.


Wrap never:

public interface MyInterfaces extends InterfaceOne, InterfaceTwo, InterfaceThree {
    ...                                 
}                                       

This wrapping mode never wraps extended class/interface names to a new line even if they do not fit into the specified maximal line length.


Wrap on demand:

public interface MyInterfaces extends InterfaceOne, InterfaceTwo,             |
                                      
InterfaceThree {                        |
    
...                                                                       |
}                                                                             |

This wrapping mode wraps extended class/interface names on demand:
If class/interface names fit into the specified maximal line length then they won't be wrapped. If they exceed maximal line length they will be wrapped to a new line though.


Wrapping mode if line exceeds works a bit different:
If the class/interface declaration line exceeds maximal line length then all extended class/interface names will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public interface MyInterfaces extends InterfaceOne, InterfaceTwo, InterfaceThree {
    ...
                                                                       |
}                                                                             |

In this example token InterfaceThree exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and all extended class/interface names will be wrapped:

public interface MyInterfaces extends InterfaceOne,                           |
                                      
InterfaceTwo,                           |
                                      
InterfaceThree {                        |
    
...                                                                       |
}                                                                             |




Wrap before implements

Wrap before implements

Controls how to wrap token implements.


Wrap always and indent by 4 white spaces:

public class MyClass                    
    
implements MyInterface {            
                                        
    ...                                 
}                                       

This wrapping mode wraps always token implements to a new line even if it would fit into the specified maximal line length.
The wrapped token implements is indented by setting: "Indentation of wrapped implements"

Wrap never :

public class MyClass implements MyInterface {
    ...                                 
}                                       

This wrapping mode never wraps token implements to a new line even if it does not fit into the specified maximal line length.


Wrap on demand and indent by 0 white spaces:

public class MyClass               |
implements MyInterface {           |
    
...                            |
}                                  |

This wrapping mode wraps token implements on demand:
If implements fits into the specified maximal line length then the token won't be wrapped. If it exceeds maximal line length it will be wrapped to a new line though. The wrapped token will be indented by setting: "Indentation of wrapped implements"


Wrapping mode if line exceeds works a bit different:
If the line where token implements belongs to exceeds maximal line length then implements will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public class MyClass implements InteraceOne, InterfaceTwo, InterfaceThree {
    ...
                                                               |
}                                                                     |

In this example token implements does not exceed the specified maximal line length, but another token InterfaceThree does. We consider this case as 'the line exceeds maximal line length' and therefore token implements will be wrapped and indented by setting: "Indentation of wrapped implements"

public class MyClass                                                  |
    
implements InteraceOne, InterfaceTwo, InterfaceThree {            |
    
...                                                               |
}                                                                     |


See also... See also: Indentation of wrapped implements




Indentation of wrapped implements

Indentation of wrapped implements

Indents wrapped token implements by a specified number of white spaces.

See also... See also: Wrap before implements




Wrap implemented interfaces

Wrap implemented interfaces

Controls how to wrap implemented interface names.


Wrap always:

public class MyClass implements InterfaceOne,
                                InterfaceTwo,

                                InterfaceThree {

                                        
    ...                                 
}                                       

This wrapping mode wraps always implemented interface names to a new line even if they fit into the specified maximal line length.


Wrap never:

public class MyClass implements InterfaceOne, InterfaceTwo, InterfaceThree {
    ...                                 
}                                       

This wrapping mode never wraps implemented interface names to a new line even if they do not fit into the specified maximal line length.


Wrap on demand:

public class MyClass implements InterfaceOne, InterfaceTwo,           |
                                
InterfaceThree {                      |
    
...                                                               |
}                                                                     |

This wrapping mode wraps implemented interface names on demand:
If interface names fit into the specified maximal line length then they won't be wrapped. If they exceed maximal line length they will be wrapped to a new line though.


Wrapping mode if line exceeds works a bit different:
If the class declaration line exceeds maximal line length then all implemented interface names will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public class MyClass implements InterfaceOne, InterfaceTwo, InterfaceThree {
    ...
                                                               |
}                                                                     |

In this example token InterfaceThree exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and all implemented interface names will be wrapped:

public class MyClass implements InterfaceOne,                         |
                                
InterfaceTwo,                         |
                                
InterfaceThree {                      |
    
...                                                               |
}                                                                     |




Wrap after modifiers

Wrap after modifiers

Controls how to wrap after modifiers of method/constructor declarations.


Wrap always:

public                                  
void 
method()                           
{                                       
    ...                                 
}                                       

This wrapping mode wraps always after modifiers of method/constructor declarations even if the line would fit into the specified maximal line length.


Wrap never:

public void method()                    
{                                       
    ...                                 
}                                       

This wrapping mode never wraps after modifiers of method/constructor declarations even if the line does not fit into the specified maximal line length.


Wrap on demand:

public static                                     |
void aPrettyLongMethodNameWhichCannotBeWrapped()  |
{                                                 |
    
...                                           |
}                                                 |

This wrapping mode wraps on demand:
If the method/constructor modifiers fit into specified maximal line length then they won't be wrapped. If they exceeds maximal line length the modifiers will be wrapped though.


Wrapping mode if line exceeds works a bit different:
If the method/constructor declaration line exceeds maximal line length then the line will be wrapped after modifiers.


We assume the following input source code example which exceeds maximal line length:

public static void longMethodName(int paramaterOne, int parameterTwo) |
{                                                                     |
    
...                                                               |
}                                                                     |

In this example token parameterTwo exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and it will be wrapped after modifiers:

public static                                                         |
void longMethodName(int paramaterOne, int parameterTwo)               |
{                                                                     |
    
...                                                               |
}                                                                     |




Wrap after method declaration return types

Wrap after method declaration return types

Controls how to wrap after return types of method declarations.


Wrap always:

public float                            
method()                                
{                                       
    ...                                 
}                                       

This wrapping mode wraps always after return types of method declarations even if the line would fit into the specified maximal line length.


Wrap never:

public float method()                   
{                                       
    ...                                 
}                                       

This wrapping mode never wraps after return types of method declarations even if the line does not fit into the specified maximal line length.


Wrap on demand:

public static float                               |
aPrettyLongMethodNameWhichCannotBeWrapped()       |
{                                                 |
    
...                                           |
}                                                 |

This wrapping mode wraps on demand:
If the method return type fits into specified maximal line length then it won't be wrapped. If it exceeds maximal line length the return type will be wrapped after its return type though.


Wrapping mode if line exceeds works a bit different:
If the method declaration line exceeds maximal line length then the line will be wrapped after its return type.


We assume the following input source code example which exceeds maximal line length:

public static int longMethodName(int paramaterOne, int parameterTwo)
{
                                                                |
    
...                                                          |
}                                                                |

In this example token parameterTwo exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and it will be wrapped after its return type:

public static int                                                |
longMethodName(int paramaterOne, int parameterTwo)               |
{                                                                |
    
...                                                          |
}                                                                |




Wrap before left parentheses (

Wrap before left parentheses (

Controls how to wrap before left parentheses of method/constructor declarations.

Please note:This setting does not affect method/constructor declarations without any parameters.


Wrap always:

public void method                      
    (
int parameterOne, int parameterTwo)
{                                       
    ...                                 
}                                       

This wrapping mode wraps always before left parentheses of method/constructor declarations even if the line would fit into the specified maximal line length.
The wrapped line is indented by setting: "Indentation of wrapped left parentheses ("
Wrapped parameters will be be aligned to its corresponding first parameter.


Wrap never:

public void method(int parameterOne, int parameterTwo)
{                                       
    ...                                 
}                                       

This wrapping mode never wraps before left parentheses of method/constructor declarations even if the line does not fit into the specified maximal line length.


Wrap on demand:

public static void aPrettyLongMethodName
    (
int parameterOne)                  |
{                                       |
    
...                                 |
}                                       |

This wrapping mode wraps on demand:
If the left parenthesis of method/constructor declaration fits into specified maximal line length then it won't be wrapped. If it exceeds maximal line length the left parenthesis will be wrapped though.


Wrapping mode if line exceeds works a bit different:
If the method/constructor declaration line exceeds maximal line length then the line will be wrapped before its left parenthesis.


We assume the following input source code example which exceeds maximal line length:

public static int longMethodName(int paramaterOne, int parameterTwo)
{
                                                                |
    
...                                                          |
}                                                                |

In this example token parameterTwo exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and it will be wrapped after its left parenthesis:

public static int longMethodName                                 |
    
(int paramaterOne, int parameterTwo)                         |
{                                                                |
    
...                                                          |
}                                                                |

Indentation of wrapped line is done by setting: "Indentation of wrapped left parentheses ("

See also... See also: Indentation of wrapped left parentheses (




Indentation of wrapped left parentheses (

Indentation of wrapped left parentheses (

Indents wrapped left parentheses of method/constructor declarations by a specified number of white spaces.

See also... See also: Wrap before left parentheses (




Wrap first parameter

Wrap first parameter

Controls how to wrap first parameters of method/constructor declarations.


Wrap always:

public void method(                     
    
int parameterOne, int parameterTwo) 
{                                       
    ...                                 
}                                       

This wrapping mode wraps always the first parameter of method/constructor declarations even if the line would fit into the specified maximal line length.
The wrapped line is indented by setting: "Indentation of first wrapped parameter"


Wrap never:

public void method(int parameterOne, int parameterTwo)
{                                       
    ...                                 
}                                       

This wrapping mode never wraps first parameter of method/constructor declarations even if the line does not fit into the specified maximal line length.


Wrap on demand:

public static void aPrettyLongMethodName(              |
    
int parameterOne)                                  |
{                                                      |
    
...                                                |
}                                                      |

This wrapping mode wraps on demand:
If the method/constructor parameters fit into specified maximal line length then it won't be wrapped. If it exceeds maximal line length the first parameter will be wrapped though.


Wrapping mode if line exceeds works a bit different:
If the method/constructor declaration line exceeds maximal line length then the first parameter will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public static int longMethodName(int paramaterOne, int parameterTwo)
{
                                                                |
    
...                                                          |
}                                                                |

In this example token parameterTwo exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and first parameter will be wrapped:

public static int longMethodName(                                |
    
int paramaterOne, int parameterTwo)                          |
{                                                                |
    
...                                                          |
}                                                                |

Indentation of wrapped line is done by setting: "Indentation of first wrapped parameter"


Indentation of first wrapped parameter

Indentation of first wrapped parameter

Indents first wrapped parameter of method/constructor declarations by a specified number of white spaces.

See also... See also: Wrap first parameter




Wrap all other parameters

Wrap all other parameters

Controls how to wrap parameters of method/constructor declarations.


Wrap always:

public void method(int parameterOne,    
                   
int parameterTwo,    
                   
int parameterThree)  
{                                       
    ...                                 
}                                       

This wrapping mode wraps always parameters of method/constructor declarations even if the line would fit into the specified maximal line length.


Wrap never:

public void method(int parameterOne, int parameterTwo, int parameterThree)
{                                       
    ...                                 
}                                       

This wrapping mode never wraps parameters of method/constructor declarations even if the line does not fit into the specified maximal line length.


Wrap on demand:

public void method(int parameterOne, int parameterTwo,      |
                   
int parameterThree)                      |
{                                                           |
    
...                                                     |
}                                                           |

This wrapping mode wraps on demand:
If the parameters of method/constructor declarations fit into specified maximal line length then they won't be wrapped. If they exceed maximal line length they will be wrapped though.


Wrapping mode if line exceeds works a bit different:
If the method/constructor declaration line exceeds maximal line length then all parameters will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public void method(int parameterOne, int parameterTwo, int parameterThree)
{
                                                                |
    
...                                                          |
}                                                                |

In this example token parameterThree exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and all parameters will be wrapped:

public void method(int parameterOne,                             |
                   
int parameterTwo,                             |
                   
int parameterThree)                           |
{                                                                |
    
...                                                          |
}                                                                |



Wrap before right parentheses )

Wrap before right parentheses )

Controls how to wrap right parentheses of method/constructor declarations.

Please note:This setting does not affect method/constructor declarations without any parameters.


Wrap always:

public void method(int parameterOne, int parameterTwo
)                                       
{                                       
    ...                                 
}                                       

This wrapping mode wraps always right parentheses of method/constructor declarations even if the line would fit into the specified maximal line length.


Wrap never:

public void method(int parameterOne, int parameterTwo)
{                                       
    ...                                 
}                                       

This wrapping mode never wraps right parentheses of method/constructor declarations even if the line does not fit into the specified maximal line length.


Wrap on demand:

public static void aPrettyLongMethodName(int parameterOne, int parameterTwo
)
                                                                          |
{                                                                          |
    
...                                                                    |
}                                                                          |

This wrapping mode wraps on demand:
If the right parenthesis of method/constructor declarations fits into specified maximal line length then it won't be wrapped. If it exceeds maximal line length the right parenthesis will be wrapped to a new line though.


Wrapping mode if line exceeds works a bit different:
If the method/constructor declaration line exceeds maximal line length then the line will be wrapped before its right parenthesis.


We assume the following input source code example which exceeds maximal line length:

public static int longMethodName(int paramaterOne, int parameterTwo)
{
                                                                |
    
...                                                          |
}                                                                |

In this example token parameterTwo exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and right parenthesis will be wrapped:

public static int longMethodName                                 |
(                                                                |
    
int paramaterOne,                                            |
    
int parameterTwo                                             |
)                                                                |
{                                                                |
    
...                                                          |
}                                                                |
In this example we additionally set "Wrap first parameter" and "Wrap before right parentheses )" to if line exceeds too.



Indentation of wrapped right parentheses )

Indentation of wrapped right parentheses )

Indents wrapped right parentheses of method/constructor declarations by a specified number of white spaces.

See also... See also: Wrap before right parentheses )




Avoid confusing indentations for methods and constructors declarations

Avoid confusing indentations for
	methods and constructors declarations

Detects 'confusing indentations' in method/constructor declarations caused by line wrapping and reindents these source code lines again with a new alternative indentation size.


Explanation of definition 'confusing indetation':

The following source code example is wrapped properly. int parameterTwo is correctly aligned to parameterOne:

public void                                       |
set(int parameterOne,                             |
    
int parameterTwo) {                           |
    
callAnotherMethod(paramterOne, paramaterTwo);        // line is easy to miss
}                                                 |

Even if this wrapping is correct at first glance the method call callAnotherMethod(...) is easy to miss. It seems it belongs to the method declaration head. Such an indetation is considered as 'confusing indentation'.
To handle this problem Jindent is able to detect this 'confusing indentations' and rather use the indentation size of "Alternative indentation" to reindent the originate source code elements.


The example above now looks like:

public void                                                           |
set(int parameterOne,                                                 |
|------|
int parameterTwo) {                                           |
    
callAnotherMethod(paramterOne, paramaterTwo);        // line is easy to miss
}                                                                     |

For setting "Alternative indentation" we assume a value of 8.
The line callAnotherMethod(...) is now separated from the method head and well-defined.

Please note: There are only rare code conventions where 'confusing indentation' can appear in method/constructor declarations.
If you don't know how to use this setting we recommend to disable it.


See also... See also: Alternative indentation , Avoid confusing indentations




Wrap before throws

Wrap before throws

Controls how to wrap token throws.


Wrap always and indent by 8 white spaces:

public static void method(int args)     
        
throws Exception {              
    callMethod();                       
}                                       

This wrapping mode wraps always token throws to a new line even if it would fit into the specified maximal line length.
The wrapped token throws is indented by setting: "Indentation of wrapped throws"


Wrap never :

public static void method(int args) throws Exception {
    callMethod();                       
}                                       

This wrapping mode never wraps token throws to a new line even if it does not fit into the specified maximal line length.


Wrap on demand and indent by 8 white spaces:

public static void method(int args)     |
        
throws Exception {              |
    
callMethod();                       |
}                                       |

This wrapping mode wraps token throws on demand:
If token throws fits into the specified maximal line length then it won't be wrapped. If it exceeds maximal line length it will be wrapped to a new line though. The wrapped token will be indented by setting: "Indentation of wrapped throws"


Wrapping mode if line exceeds works a bit different:
If the line where token throws belongs to exceeds maximal line length then throws will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public static void method(int args) throws Exception1, Exception2 {
    callMethod();
                                           |
}                                                           |

In this example token throws does not exceed the specified maximal line length, but another token Exception2 does. We consider this case as 'the line exceeds maximal line length' and therefore token throws will be wrapped and indented by setting: "Indentation of wrapped throws"

public static void method(int args)                         |
        
throws Exception1, Exception2 {                     |
    
callMethod();                                           |
}                                                           |


See also... See also: Indentation of wrapped throws




Indentation of wrapped throws

Indentation of wrapped throws

Indents wrapped token throws by a specified number of white spaces.

See also... See also: Wrap before throws




Wrap throws exceptions

Wrap throws exceptions

Controls how to wrap exceptions of method/constructor declarations.


Wrap always:

public void method(int parameterOne) throws Exception1,
                                            Exception2,

                                            Exception3 {

    ...                                 
}                                       

This wrapping mode wraps always exceptions of method/constructor declarations even if the line would fit into the specified maximal line length.


Wrap never:

public void method(int parameterOne) throws Exception1, Exception2, Exception3 {
    ...                                 
}                                       

This wrapping mode never wraps exceptions of method/constructor declarations even if the line does not fit into the specified maximal line length.


Wrap on demand:

public void method(int parameterOne) throws Exception1, Exception2,   |
                                            
Exception3 {              |
    
...                                                               |
}                                                                     |

This wrapping mode wraps on demand:
If the exceptions of method/constructor declarations fit into specified maximal line length then they won't be wrapped. If they exceed maximal line length they will be wrapped though.


Wrapping mode if line exceeds works a bit different:
If the method/constructor declaration line exceeds maximal line length then all exceptions will be wrapped.


We assume the following input source code example which exceeds maximal line length:

public void method(int parameterOne) throws Exception1, Exception2, Exception3 {
    ...
                                                               |
}                                                                     |

In this example token Exception3 exceeds the specified maximal line length, therefore we consider this case as 'the line exceeds maximal line length' and all exceptions will be wrapped:

public void method(int parameterOne) throws Exception1,               |
                                            
Exception2,               |
                                            
Exception3 {              |
    
...                                                               |
}                                                                     |



Wrap lambda parameters of expressions with blocks

Wrap lambda parameters of expressions with blocks

Controls how to wrap Lambda parameter declarations containing blocks.


Never wrap Lambda parameters:

int sum = Arrays.stream(x)              
                .filter((n) -> {        
                            
System.out.println("Filtering: " + n);
                            
return n % != 0;
                        })              
                .reduce(
0Integer::sum)


Always wrap Lambda parameters:

int sum = Arrays.stream(x)                   |
                
.filter(                     |
                    
(n) -> {                 |
                        
System.out.println("Filtering: " + n);
                        
return n % != 0;   |
                    
})                       |
                
.reduce(0Integer::sum)     |


Wrap Lambda parameters if line exceeds:

int sum = Arrays.stream(x)                                       |
                
.filter(                                         |
                    
(n) -> {                                     |
                        
System.out.println("Filtering: " + n);   |
                        
return n % != 0;                       |
                    
})                                           |
                
.reduce(0Integer::sum)                         |

See also... See also: Indentation of wrapped lambda parameters




Indentation of wrapped lambda parameters

Indentation of wrapped lambda parameters

Controls indentation size of Lambda parameter declarations containing blocks.


Indentation of 4:

int·sum·=·Arrays.stream(x)              
················.filter(                
                
····(n)·->·{            
························System.out.println("Filtering:·"·+·n);
························return·n·%·3·!=·0;
····················})                  
················.reduce(0,·Integer::sum)


Indentation of 0:

int·sum·=·Arrays.stream(x)              
················.filter(                
                (n)
·->·{                
····················System.out.println("Filtering:·"·+·n);
···················return·n·%·3·!=·0;   
················})                      
················.reduce(0,·Integer::sum)



Wrap Enum constants

Wrap Enum constants

Controls how to wrap constants in enumeration declarations.


Wrap enum constants on demand:

enum Counter {                               |
    
ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, |
    
EIGHT, NINE, TEN                         |
};                                           |


Wrap enum constants always:

enum Seasons {                               |
    
SPRING,                                  |
    
SUMMER,                                  |
    
AUTUMN,                                  |
    
WINTER                                   |
};                                           |


Wrap enum constants if line exceeds:

enum Seasons {                               |
    
SPRING, SUMMER, AUTUMN, WINTER           |
};                                           |
                                             |
enum Counter {                               |
    
ONE,                                     |
    
TWO,                                     |
    
THREE,                                   |
    
FOUR,                                    |
    
FIVE,                                    |
    
SIX,                                     |
    
SEVEN,                                   |
    
EIGHT,                                   |
    
NINE,                                    |
    
TEN                                      |
};                                           |



Maximal number of enumeration constants lined up in one line

Maximal number of enumeration constants
	lined up in one line

Specifies how many enumeration constants are lined up in one row.


Line up to 5 elements in one row:

enum Enum1 { ONE, TWO, THREE };         
                                        
enum Enum2 { ONE, TWO, THREE, FOUR, FIVE };
                                        
enum Enum3 {                            
    ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN,

    EIGHT, NINE, TEN                    
};                                      


Line up to 3 elements in one row:

enum Enum1 { ONE, TWO, THREE };         
                                        
enum Enum2 {                            
    ONE, TWO, THREE, FOUR, FIVE         
};                                      
                                        
enum Enum3 {                            
    ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN,

    EIGHT, NINE, TEN                    
};                                      

To line up all elements in one row use setting value infinite.
To line up no element in one row use setting value 0.




Wrap after left parentheses ( on demand

Wrap after left parentheses ( on demand

Enables line wrapping after left parentheses of enumerations on demand. Usually this kind of line wrapping is only needed in some very rare cases. Enabling of this setting is recommended.


Maximal number of array initializer elements lined up in one line

Maximal number of array initializer elements
	lined up in one line

Specifies how many array initializer elements are lined up in one row.


Line up to 5 elements in one row:

int array1[] = { 12};             
                                        
int array2[] = { 1234};       
                                        
int array3[] = {                        
    
11121314151617181920,
    
21222324252627282930
};                                      


Line up to 3 elements in one row:

int array1[] = { 12};             
                                        
int array2[] = {                        
    
12345                       
};                                      
                                        
int array3[] = {                        
    
11121314151617181920,
    
21222324252627282930
};                                      

To line up all elements in one row use setting value infinite.
To line up no element in one row use setting value 0.