I have an ArrayList<ArgTypes>
public class ArgTypes
{
// Instance
String argName;
ArgValueTypes argumentValueType;
double doubleValue;
boolean booleanValue;
int intValue;
// Constructor of each pair
public ArgTypes (String inputArgName, ArgValueTypes inputArgumentValueType, double target)
{
this.argName = inputArgName;
this.argumentValueType = inputArgumentValueType;
this.doubleValue = target;
}
};
doubleValy, booleanValue, and intValue in my C implementation of this code are a union that is a pointer to various variables. My goal is to Double.ParseDouble a String and store the double into a variable for later reference. In C, I store a double* and then use indirection to store the value where I want it. What is the equivalent in Java. Is there one?
https://www.teepublic.com/t-shirt/28801088-help-me-stack-overflow-you-re-my-only-hope
ReplyDelete