Java ListIterator Usage removeCustomFilters(List filters)

Here you can find the source of removeCustomFilters(List filters)

Description

remove Custom Filters

License

Open Source License

Declaration

public static List<String> removeCustomFilters(List<String> filters) 

Method Source Code


//package com.java2s;
import java.util.ArrayList;

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

public class Main {
    public static List<String> removeCustomFilters(List<String> filters) {
        List<String> mentions = new ArrayList<String>();
        ListIterator<String> filterIterator = filters.listIterator();
        while (filterIterator.hasNext()) {
            String[] filterSplit = filterIterator.next().split(":");
            if (filterSplit[1].equals("in") && filterSplit[0].equals("mentions")) {
                mentions.add(filterSplit[2]);
                filterIterator.remove();
            }// ww w .  j  a  v  a  2 s. co m
        }
        return mentions;
    }
}

Related

  1. parsePath(String sPath)
  2. partialSort(List list, int numTop, Comparator c)
  3. peekNext(ListIterator it)
  4. peekNext(ListIterator iterator)
  5. print(final List concatenatables)
  6. removeDuplicates(List list)
  7. removeStartsWith(String prefix, List lines)
  8. reset(ListIterator iterator)
  9. retainAll(final List list, final Collection indices)