Java ListIterator Usage removeStartsWith(String prefix, List lines)

Here you can find the source of removeStartsWith(String prefix, List lines)

Description

remove Starts With

License

Open Source License

Declaration

public static void removeStartsWith(String prefix, List<String> lines) 

Method Source Code

//package com.java2s;
//  are made available under the terms of the Eclipse Public License v1.0

import java.util.List;
import java.util.ListIterator;

public class Main {
    public static void removeStartsWith(String prefix, List<String> lines) {
        ListIterator<String> it = lines.listIterator();
        while (it.hasNext()) {
            String line = it.next();
            if (line.startsWith(prefix)) {
                it.remove();//www  .java2  s  . c o m
            }
        }
    }
}

Related

  1. peekNext(ListIterator it)
  2. peekNext(ListIterator iterator)
  3. print(final List concatenatables)
  4. removeCustomFilters(List filters)
  5. removeDuplicates(List list)
  6. reset(ListIterator iterator)
  7. retainAll(final List list, final Collection indices)
  8. rewindIterator( @SuppressWarnings("rawtypes") ListIterator it, int n)
  9. sort(List aList)