All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nls.util.TupleList Maven / Gradle / Ivy

There is a newer version: 1.0.14
Show newest version
package com.nls.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class TupleList extends ArrayList> {
    public TupleList(Collection> collection) {
        super(collection);
    }

    public TupleList(Map map) {
        this(Tuple.fromMap(map));
    }

    public TupleList reverseTuples() {
        return new TupleList(this.stream().map(Tuple::reverse).collect(Collectors.toList()));
    }

    public Map toMap() {
        return Tuple.toMap(this);
    }

    public Map> toGroupedMap() {
        return Tuple.toGroupedMap(this);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy