So, I'm looking through a java library (JScience) after someone here thoughfully pointed me towards it for getting Vectors (mathematical ones, that is) in java.
Unfortunately, I've never seen anything in my life before like:
public static <F extends Field<F>> DenseVector<F> valueOf(F... elements)
as a method you can call in the DenseVector class. What...does that even mean. Is it returning a "<F extends Field<F>>
" (and if so, why does Eclipse think it's an input?)
http://jscience.org/api/org/jscience/mathematics/vector/DenseVector.html#valueOf%28F...%29
It really confuses me. I can't make a new DenseVector()
because only the super class has that, and it's protected, and trying to do DenseVector.valueOf()
apparently only works if I give it...that...weird thing as an input.
I've seen people having to instantiate methods when trying to instantiate objects (or something like that)...is that like that (or IS it that?)) What is the API trying to get me to do?
I'm kind of confused that I've learned java in school (and used it a bit at work, though we use a lot of differnet stuff besides just java), and never came across anything like this. What's it for? What's it trying to get me to do? Is it new? Old? Obscure?
-Jenny