Class SimpleRC

java.lang.Object
org.jpos.rc.SimpleRC
All Implemented Interfaces:
RC

public class SimpleRC extends Object implements RC
Result Code implementation
  • Constructor Details

    • SimpleRC

      public SimpleRC(String rc)
      Constructs a SimpleRC carrying only the response code.
      Parameters:
      rc - response code (must not be null)
      Throws:
      NullPointerException - if rc is null
    • SimpleRC

      public SimpleRC(String rc, String display)
      Constructs a SimpleRC with a response code and a human-readable display string.
      Parameters:
      rc - response code (must not be null)
      display - optional display string
  • Method Details

    • rc

      public String rc()
      Description copied from interface: RC
      Returns the response code value.
      Specified by:
      rc in interface RC
      Returns:
      response code (e.g. "00", "05")
    • display

      public String display()
      Description copied from interface: RC
      Returns a human-readable rendering of the response code.
      Specified by:
      display in interface RC
      Returns:
      display string, or null when not set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object