Package dev.nm.algebra.linear.vector
Class VectorAccessException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- dev.nm.algebra.linear.vector.VectorAccessException
-
- All Implemented Interfaces:
Serializable
public class VectorAccessException extends RuntimeException
This is the exception thrown when any invalid access to aVector
instance is detected, e.g., out-of-range index.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VectorAccessException(int size, int index)
Constructs an instance ofVectorAccessException
for out-of-range access.VectorAccessException(String msg)
Constructs an instance ofVectorAccessException
.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
VectorAccessException
public VectorAccessException(int size, int index)
Constructs an instance ofVectorAccessException
for out-of-range access.- Parameters:
size
- the vector sizeindex
- the out-of-range index
-
VectorAccessException
public VectorAccessException(String msg)
Constructs an instance ofVectorAccessException
.- Parameters:
msg
- the error message
-
-