If you have an array of doubles and each array element in a specific position has a definite meaning you should create a class instead.
public class MyParamBlob extends ParentParamBlob
{
private double myReadableParameter;
private double anotherParameter;
private double yetOneMore;
// getters and setters as appropriate
}
If you need to deal with an existing double[]
from "outside" you could have a constructor and/or a method that takes an array as a parameter.
public class MyParamBlob
{
...
public MyParamBlob(double[] values)
{
setAll(values);
}
// getters and setters as appropriate
...
public void setAll(double[] values)
{
myReadableParameter = values[0];
anotherParameter = values[1];
// etc.
}
}
Edit - to explain my comment
If the original parent class that this is a subclass of (the reason the double[] exists in the first place) has a getter for the array, that could be overridden in this class, building and returning the array when requested -- e.g.
public double[] getParams()
{
double[] params = new double[4];
params[0] = myReadableParameter;
params[1] = anotherParameter;
// etc.
}
If the array is directly accessible from an instance of the parent class, without a getter, e.g. myArray = parentInstance.params
or double d2 = parentInstance.params[2]
then (1) that's a bad design and (2) callers could change the array values out from under you parentInstance.params[1] = 0.0;