Java List Distinct Value distinct(List vector)

Here you can find the source of distinct(List vector)

Description

distinct

License

Apache License

Declaration

public static <T> List<T> distinct(List<T> vector) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static <T> List<T> distinct(List<T> vector) {
        List<T> distinctVector = new ArrayList<T>();
        vector.stream().distinct().forEach(s -> distinctVector.add(s));
        return distinctVector;
    }//from   ww w.  j  av a2s  .  co m
}

Related

  1. addDistinctList(List sourceList, List entryList)
  2. addWithExpDecay(List distinctVals)
  3. constructDistinctClause(StringBuffer selectClause, List attributes, boolean isCountOnly)
  4. distinct(List list)
  5. distinct(List list)
  6. distinctList(List sourceList)
  7. getDistinctStrings(String[] list)
  8. sortedDistinct(List seq)