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

com.jl.set.list.JArrayList Maven / Gradle / Ivy

The newest version!
package com.jl.set.list;

import com.jl.JLSet;
import com.jl.JLambda;

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

/**
 * arrayList
 *
 * @param 
 */
public class JArrayList extends ArrayList implements JList {

    public JArrayList() {
    }

    public JArrayList(int initialCapacity) {
        super(initialCapacity);
    }

    public JArrayList(List list) {
        super(list);
    }

    @Override
    public JList set(T t) {
        this.add(t);
        return this;
    }

    @Override
    public JList setAll(List list) {
        this.addAll(list);
        return this;
    }

    @Override
    public  ToMapOper toMap(JLambda.JFunction jlFunction) {
        return new ToMapOper<>(this, jlFunction);
    }

    @Override
    public ToMapOper toMap() {
        return new ToMapOper<>(this);
    }

    @Override
    public JList comparing(JLambda.JFunction... jlFunction) {
        List comparing = JLSet.list(this).comparing(jlFunction);
        return new JArrayList(comparing);
    }

    @Override
    public JList comparing() {
        List comparing = JLSet.list(this).comparing();
        return new JArrayList<>(comparing);
    }

    @Override
    public JList asc(JLambda.JFunction jlFunction) {
        List asc = JLSet.list(this).asc(jlFunction);
        return new JArrayList<>(asc);
    }

    @Override
    public JList asc() {
        List asc = JLSet.list(this).asc();
        return new JArrayList(asc);
    }

    @Override
    public JList desc(JLambda.JFunction jlFunction) {
        List desc = JLSet.list(this).desc(jlFunction);
        return new JArrayList<>(desc);
    }

    @Override
    public JList desc() {
        List desc = JLSet.list(this).desc();
        return new JArrayList<>(desc);
    }

    @Override
    public  JList getProperty(JLambda.JFunction jlFunction) {
        List property = JLSet.list(this).getProperty(jlFunction);
        return new JArrayList<>(property);
    }

    @Override
    public JList shuffle() {
        List shuffle = JLSet.list(this).shuffle();
        return new JArrayList<>(shuffle);
    }

    @Override
    public int getIndex(T t) {
        return JLSet.list(this).getIndex(t);
    }

    @Override
    public JList diff(List list2) {
        List diff = JLSet.list(this).diff(list2);
        return new JArrayList<>(diff);
    }

    @Override
    public JList section(List list2) {
        List section = JLSet.list(this).section(list2);
        return new JArrayList<>(section);
    }

    @Override
    public JList> partition(int size) {
        List> partition = JLSet.list(this).partition(size);
        JList> jList = new JArrayList<>();
        for (List list : partition) {
            jList.add(new JArrayList<>(list));
        }
        return jList;
    }

    @Override
    public Filter filter() {
        return new Filter<>(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy