I want to write for myself a library for working with matrices. I think how to ensure that arithmetic operations can be performed on the elements of the matrix.
Are there any Java SE interfaces that declare methods like add() , subtract() , etc.? As I understand it, the Number class does not help with this, and it doesn’t fit much here, because the elements of the matrix will not necessarily be numbers.