Java Array Remove removePointerFromDesc(String[] desc)

Here you can find the source of removePointerFromDesc(String[] desc)

Description

remove Pointer From Desc

License

Open Source License

Declaration

static private String[] removePointerFromDesc(String[] desc) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 *  Copyright (c) 2014, 2016 IBM Corporation.
 *  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 {
    static private String[] removePointerFromDesc(String[] desc) {
        ArrayList<String> tmp = new ArrayList<String>();
        for (String s : desc) {
            if (!isPointerType(s.split(":")[1])) {
                tmp.add(s);// ww w .  j av  a 2  s .c o  m
            }
        }
        return tmp.toArray(new String[0]);
    }

    static public boolean isPointerType(String type) {
        return type.equals("Pointer");
    }
}

Related

  1. removeNulls(T[] array)
  2. removeNulls(T[] array)
  3. removeNulls(T[] input)
  4. removeNullsFromStringArray(String[] array)
  5. removeOwnCookieNameFromCookieHeader(String ownCookieName, String[] cookies)
  6. removeRepeats(T[] array)
  7. removeRows(int[][] array, Collection rowsIndices)
  8. removeTrailing(final byte[] id)
  9. removeUser(String[] array, String user)