if ( environmentArray != null )
{
for ( int i = 0; i < environmentArray.length; i++ )
{
EnvironmentDocument.Environment environment = environmentArray[i];
Environment env = new Environment( );
env.setDescription( environment.getDescription( ) );
env.setName( environment.getName( ) );
env.setType( environment.getType( ) );
env.setValue( environment.getValue( ) );
envList.add( env );
}
}
return (Environment[]) envList.toArray( new Environment[0] );