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

com.sigopt.model.Pagination Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
package com.sigopt.model;

import com.sigopt.exception.APIException;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class Pagination extends StructObject {
    Class klass;

    public Pagination(Class klass) {
        super();
        this.klass = klass;
    }

    public Integer getCount() {
        return Utils.asInteger(this.get("count"));
    }

    public List getData() {
        return Utils.mergeIntoList(new ArrayList(), this.get("data"), this.klass);
    }

    public Paging getPaging() {
        return Utils.mergeInto(new Paging(), this.get("paging"));
    }
}

class Paging extends StructObject {
    public Paging() {
        super();
    }

    public Paging(String before, String after) {
        super();
        this.set("before", before);
        this.set("after", after);
    }

    public String getBefore() {
        return (String) this.get("before");
    }

    public String getAfter() {
        return (String) this.get("after");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy