public class InvalidBitNumberForPrimitiveException extends RuntimeException implements BitStorageException
Constructor and Description |
---|
InvalidBitNumberForPrimitiveException(String message,
BitField source,
long numberOfBits,
int primitiveSize)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
long |
getNumberOfBits()
Returns the invalid bit index.
|
int |
getPrimitiveSize()
Returns the number of bits the primitive where the bit should have been stored can contain.
|
BitField |
getSource()
Returns the bit field where the exception occurred.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InvalidBitNumberForPrimitiveException(String message, BitField source, long numberOfBits, int primitiveSize)
message
- the error messagesource
- the bit field throwing this exceptionnumberOfBits
- the invalid number of bit that were tried to store in the primitiveprimitiveSize
- the number of bits the primitive can containpublic BitField getSource()
BitStorageException
getSource
in interface BitStorageException
public long getNumberOfBits()
public int getPrimitiveSize()