public class HGAtomRefusedException extends HGException
This exception is thrown when an attempt to add a new atom to a HyperGraph instance
failed. Generally, this exception is thrown as a response to the HGAtomProposeEvent
and can be caught by an application that expects it to occur. Listener of the
can be defined to implement various database integrity constraints or
even application-level constraints that are otherwise cumbersome to enforce.
Constructor and Description |
---|
HGAtomRefusedException()
Default constructor.
|
HGAtomRefusedException(Object atom,
Object reason) |
Modifier and Type | Method and Description |
---|---|
Object |
getAtom()
Return the proposed atom whose addition failed.
|
Object |
getReason()
Return the reason of the failure - could be a string or a more complex
object interpreted by the application at hand.
|
void |
setAtom(Object atom)
Set the proposed atom whose addition failed.
|
void |
setReason(Object reason)
Set the reason for the failure (a string or anything else an application
can make use of).
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HGAtomRefusedException()
Default constructor. Normally used only for serialization/de-serialization purposes.
Call setAtom
and setReason
subsequently.
public Object getAtom()
public void setAtom(Object atom)
atom
- public Object getReason()
public void setReason(Object reason)
reason
- Copyright © 2015. All rights reserved.