Class NodeVerificationCriteria

java.lang.Object
com.github.tadukoo.parsing.fileformat.NodeVerificationCriteria

public class NodeVerificationCriteria extends Object
Criteria object used for verifying a Node. Used in FormatNodeVerification.
Version:
Alpha v.0.3
Author:
Logan Ferree (Tadukoo)
  • Field Details

    • logger

      private final com.github.tadukoo.util.logger.EasyLogger logger
      The EasyLogger to use in logging messages
    • filepath

      private final String filepath
      The path to the file - used in some formatting
    • node

      private final Node node
      The Node to be checked
    • format

      private final FormatNode format
      The FormatNode that defines the expected format
    • nullParent

      private final boolean nullParent
      Whether to check that the parent is null or not
    • nullChild

      private final boolean nullChild
      Whether to check that the child is null or not
    • nullPrevSibling

      private final boolean nullPrevSibling
      Whether to check that the previous sibling is null or not
    • nullNextSibling

      private final boolean nullNextSibling
      Whether to check that the next sibling is null or not
    • parent

      private final Node parent
      The expected parent for the Node
    • child

      private final Node child
      The expected child for the Node
    • prevSibling

      private final Node prevSibling
      The expected previous sibling for the Node
    • nextSibling

      private final 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 - The EasyLogger 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 - Whether to check that the parent is null or not
      nullChild - Whether to check that the child is null or not
      nullPrevSibling - Whether to check that the previous sibling is null or not
      nullNextSibling - Whether 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
  • 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

      public String getFilepath()
      Returns:
      The path to the file - used in some formatting
    • getNode

      public Node getNode()
      Returns:
      The Node to be checked
    • getFormat

      public FormatNode 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

      public Node getParent()
      Returns:
      The expected parent for the Node
    • getChild

      public Node getChild()
      Returns:
      The expected child for the Node
    • getPrevSibling

      public Node getPrevSibling()
      Returns:
      The expected previous sibling for the Node
    • getNextSibling

      public Node getNextSibling()
      Returns:
      The expected next sibling for the Node