com.rethinkdb.model.Profile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qj-rethinkdb-driver Show documentation
Show all versions of qj-rethinkdb-driver Show documentation
Java driver for RethinkDB (Modified from Official version)
package com.rethinkdb.model;
import org.json.simple.JSONArray;
import java.util.Optional;
public class Profile {
private JSONArray profileObj;
private Profile(JSONArray profileObj){
this.profileObj = profileObj;
}
public static Optional fromJSONArray(JSONArray profileObj) {
if(profileObj == null || profileObj.size() == 0){
return Optional.empty();
} else {
return Optional.of(new Profile(profileObj));
}
}
public JSONArray getProfileObj(){
return profileObj;
}
}