import { ArrayList } from './ArrayList'; import {HashSet} from "./HashSet"; export class Collectors { /** * @deprecated useless in js * @param create */ static toCollection>( create: (list: T[]) => R ): (list: T[]) => R { return create; } static toList() { return function (p1: T[]) { return p1; }; } static toSet(){ return function (items: T[]): T[] { return Array.from(new HashSet(items)); }; } }