I have a java class as follows:
public class Query implements Serializable {
static Object[] o= new Object[8];
private long oid= (Long) o[0];
private double[] region= { (Double) o[1],(Double) o[2],(Double) o[3] };
private boolean filter= (Boolean) o[4];
private float[] vel= {(Float) o[5], (Float) o[6]};
private float[] pos= {(Float) o[7], (Float) o[8]};
public Query(Object[] b){
o=b;
}
Class Query will be an array of objects and I want to establish dependency between Object[] o and oid, region,...
If I change region's value, the corresponding value in object[] will be changed automatically.
Could you suggest me some way to do it efficiently. Thanks!