com.mocean.modules.command.McBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moceanapisdk Show documentation
Show all versions of moceanapisdk Show documentation
This is an Mocean SDK written in java. To use it you will need a mocean account. Signup for free at https://moceanapi.com
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