First, you can't iterate over a generic list expecting it to be a double (this is the compile time checking at work that makes generics so powerful). You need to iterate over the list using the generic
Code :
for ( T t : myList ){
//do something
}
Second, you are accessing the method in a static way - define it as static or define a class that implements the method. Lastly, I presume based upon the function name you want to calculate the total regardless of whether the list contains int's, double's, etc...in which case you might want to have T extends Number, so you can use the doubleValue method to calculate the total