What is this "method prototype" actually in this Java source? -


i wanted @ source getrowvector method of realmatrix class in apache commons math library. found here: grepcode.

for reason though, seemingly none of methods shown have implementation; function prototypes:

realvector getrowvector(int row) throws matrixindexexception; 

after searching though, found java doesn't have prototypes. purpose of code above? there actual implementation somewhere?

it's odd because full implementation similar realvector class given i'd expect; it's realmatrix that's this.

realmatrix interface. interface defines contract implementations responsible fulfilling, without providing implementation code (although of java8 can have default methods , static methods). can use interface limit how client needs know object it's using. basic example java.util.list, provides common methods accessing , modifying lists, , has multiple implementations, provided in jdk collections library (one list backed array, 1 linked list implementation), , implemented in libraries , frameworks (for instance, hibernate has own list implementation facilitating lazy-loading in persistent entities).

the apidoc page lists implementing classes: abstractrealmatrix, array2drowrealmatrix, blockrealmatrix, diagonalmatrix, openmaprealmatrix.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -