private List < Deployment > defaultDeployments ( List < Deployment > deployments ) { List < Deployment > defaults = new ArrayList < Deployment > ( ) ; for ( Deployment deployment : deployments ) { if ( deployment . getDescription ( ) . getName ( ) . equals ( DeploymentTargetDescription . DEFAULT . getName ( ) ) ) { defaults . add ( deployment ) ; } } return defaults ; }
Filters the List of Deployments and returns the ones that are DEFAULT deployments .