Java Array Remove removeMethodsOption(String[] args)

Here you can find the source of removeMethodsOption(String[] args)

Description

Searches in args for the String #METHODS_OPTION and removes it.

License

Open Source License

Parameter

Parameter Description
args The args from a main method.

Return

The args Array without the String .

Declaration

public static String[] removeMethodsOption(String[] args) 

Method Source Code

//package com.java2s;
/******************************************************************************
 * Copyright (c) 2007 Stefan Franke, Robert Hanussek, Benjamin Keil,          *
 *                    Steffen Kie?, Johannes Langauf,                         *
 *                    Christoph Marian M?ller, Igor Podolskiy,                *
 *                    Tilmann Scheller, Michael Starzmann, Markus Wittlinger  *
 * All rights reserved. This program and the accompanying materials           *
 * are made available under the terms of the Eclipse Public License v1.0      *
 * which accompanies this distribution, and is available at                   *
 * http://www.eclipse.org/legal/epl-v10.html                                  *
 ******************************************************************************/

import java.util.ArrayList;

public class Main {
    /**/*from   ww w . j a  v a2s  .  c  om*/
     * Searches in args for the String {@value #METHODS_OPTION} and removes it.
     * 
     * @param args The args from a main method.
     * 
     * @return The args Array without the String {@value #METHODS_OPTION}.
     */
    public static String[] removeMethodsOption(String[] args) {
        ArrayList list = new ArrayList(args.length);
        for (int i = 0; i < args.length; i++) {
            list.add(args[i]);
        }
        return (String[]) list.toArray(new String[list.size()]);
    }
}

Related

  1. removeId(byte[] in, Integer id)
  2. removeIndex(String[] args, int index)
  3. removeIndex(T[] array, int index)
  4. removeLast(byte[] target, int end)
  5. removeLowScore(int[] array)
  6. removeNaN(double[] x1)
  7. removeNodes(T[] array, T sampleNode)
  8. removeNull(T[] data)
  9. removeNullElements(String[] x)