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

com.mocean.modules.command.McBuilder Maven / Gradle / Ivy

Go to download

This is an Mocean SDK written in java. To use it you will need a mocean account. Signup for free at https://moceanapi.com

There is a newer version: 1.1.5
Show newest version
package com.mocean.modules.command;

import com.mocean.exception.RequiredFieldException;
import com.mocean.modules.command.mc.AbstractMc;

import java.util.ArrayList;
import java.util.HashMap;

public class McBuilder {
    protected ArrayList mc;

    public McBuilder() {
        this.mc = new ArrayList<>();
    }

    public McBuilder add(AbstractMc mc) {
        this.mc.add(mc);
        return this;
    }

    public ArrayList> build() throws RequiredFieldException {
        ArrayList> converted = new ArrayList<>();
        for (AbstractMc mc : this.mc) {
            converted.add(mc.getRequestData());
        }
        return converted;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy