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 rethinkdb-driver Show documentation
Show all versions of rethinkdb-driver Show documentation
Official Java driver for RethinkDB
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;
}
}