public DefaultJobProgressStep addLevel ( int steps , Object newLevelSource , boolean levelStep ) { assertModifiable ( ) ; this . maximumChildren = steps ; this . levelSource = newLevelSource ; if ( steps > 0 ) { this . childSize = 1.0D / steps ; } if ( this . maximumChildren > 0 ) { this . children = new ArrayList <> ( this . maximumChildren ) ; } else { this . children = new ArrayList <> ( ) ; } this . levelStep = levelStep ; // Create a virtual child return new DefaultJobProgressStep ( null , newLevelSource , this ) ; }
Add children to the step and return the first one .