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

koji.developerkit.utils.duplet.DupletList Maven / Gradle / Ivy

Go to download

Koji's Developer kit is a dev kit I made for Minecraft that can make creating things and doing things within the Minecraft Spigot API easier

There is a newer version: 2.0.2.8
Show newest version
package koji.developerkit.utils.duplet;

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

public class DupletList extends ArrayList> {
    public boolean add(A a, B b) {
        return add(Tuple.of(a, b));
    }

    public List firstToList() {
        List list = new ArrayList<>();
        this.forEach(duplet -> list.add(duplet.getFirst()));
        return list;
    }

    public List secondToList() {
        List list = new ArrayList<>();
        this.forEach(duplet -> list.add(duplet.getSecond()));
        return list;
    }
}