Class NodeVerificationCriteria
java.lang.Object
com.github.tadukoo.parsing.fileformat.NodeVerificationCriteria
Criteria object used for verifying a
Node
. Used in FormatNodeVerification
.- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Node Verification Criteria Builder is a builder forNodeVerificationCriteria
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final Node
The expected child for the Nodeprivate final String
The path to the file - used in some formattingprivate final FormatNode
The FormatNode that defines the expected formatprivate final com.github.tadukoo.util.logger.EasyLogger
TheEasyLogger
to use in logging messagesprivate final Node
The expected next sibling for the Nodeprivate final Node
The Node to be checkedprivate final boolean
Whether to check that the child is null or notprivate final boolean
Whether to check that the next sibling is null or notprivate final boolean
Whether to check that the parent is null or notprivate final boolean
Whether to check that the previous sibling is null or notprivate final Node
The expected parent for the Nodeprivate final Node
The expected previous sibling for the Node -
Constructor Summary
ModifierConstructorDescriptionprivate
NodeVerificationCriteria
(com.github.tadukoo.util.logger.EasyLogger logger, String filepath, Node node, FormatNode format, boolean nullParent, boolean nullChild, boolean nullPrevSibling, boolean nullNextSibling, Node parent, Node child, Node prevSibling, Node nextSibling) Creates a new NodeVerificationCriteria object with the given parameters -
Method Summary
-
Field Details
-
logger
private final com.github.tadukoo.util.logger.EasyLogger loggerTheEasyLogger
to use in logging messages -
filepath
The path to the file - used in some formatting -
node
The Node to be checked -
format
The FormatNode that defines the expected format -
nullParent
private final boolean nullParentWhether to check that the parent is null or not -
nullChild
private final boolean nullChildWhether to check that the child is null or not -
nullPrevSibling
private final boolean nullPrevSiblingWhether to check that the previous sibling is null or not -
nullNextSibling
private final boolean nullNextSiblingWhether to check that the next sibling is null or not -
parent
The expected parent for the Node -
child
The expected child for the Node -
prevSibling
The expected previous sibling for the Node -
nextSibling
The expected next sibling for the Node
-
-
Constructor Details
-
NodeVerificationCriteria
private NodeVerificationCriteria(com.github.tadukoo.util.logger.EasyLogger logger, String filepath, Node node, FormatNode format, boolean nullParent, boolean nullChild, boolean nullPrevSibling, boolean nullNextSibling, Node parent, Node child, Node prevSibling, Node nextSibling) Creates a new NodeVerificationCriteria object with the given parameters- Parameters:
logger
- TheEasyLogger
to use in logging messagesfilepath
- The path to the file - used in some formattingnode
- The Node to be checkedformat
- The FormatNode that defines the expected formatnullParent
- Whether to check that the parent is null or notnullChild
- Whether to check that the child is null or notnullPrevSibling
- Whether to check that the previous sibling is null or notnullNextSibling
- Whether to check that the next sibling is null or notparent
- The expected parent for the Nodechild
- The expected child for the NodeprevSibling
- The expected previous sibling for the NodenextSibling
- The expected next sibling for the Node
-
-
Method Details
-
builder
- Returns:
- A builder for the params object for verifying a single Node
-
getLogger
public com.github.tadukoo.util.logger.EasyLogger getLogger()- Returns:
- The
EasyLogger
to use in logging messages
-
getFilepath
- Returns:
- The path to the file - used in some formatting
-
getNode
- Returns:
- The Node to be checked
-
getFormat
- Returns:
- The FormatNode that defines the expected format
-
checkNullParent
public boolean checkNullParent()- Returns:
- Whether to check that the parent is null or not
-
checkNullChild
public boolean checkNullChild()- Returns:
- Whether to check that the child is null or not
-
checkNullPrevSibling
public boolean checkNullPrevSibling()- Returns:
- Whether to check that the previous sibling is null or not
-
checkNullNextSibling
public boolean checkNullNextSibling()- Returns:
- Whether to check that the next sibling is null or not
-
getParent
- Returns:
- The expected parent for the Node
-
getChild
- Returns:
- The expected child for the Node
-
getPrevSibling
- Returns:
- The expected previous sibling for the Node
-
getNextSibling
- Returns:
- The expected next sibling for the Node
-