Class ErrorNodeNull

Object
ErrorNode
ErrorNodeNull
All Implemented Interfaces:
Serializable

public class ErrorNodeNull extends ErrorNode
A singleton implementation of ErrorNode that does nothing with errors.

This class implements the Null Object pattern for ErrorNode, allowing error handling to be safely ignored when desired.

Author:
Owen Feehan
See Also:
  • Method Details

    • instance

      public static ErrorNodeNull instance()
      Gets the singleton instance of ErrorNodeNull.
      Returns:
      the ErrorNodeNull instance
    • add

      public ErrorNode add(String errorMessage)
      Description copied from class: ErrorNode
      Adds an error message to this node.
      Specified by:
      add in class ErrorNode
      Parameters:
      errorMessage - the error message to add
      Returns:
      the current ErrorNode instance for method chaining