Class VotLintCode


  • public class VotLintCode
    extends java.lang.Object
    Provides a label for a message passed to a VotLint context. This is just a typed wrapper around a 3-letter string, intended to identify message instances that are essentially reporting problems that are the same or similar.
    Since:
    26 May 2021
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      VotLintCode​(java.lang.String txt)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getCode()
      Returns the three-letter identifier for this object.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • VotLintCode

        public VotLintCode​(java.lang.String txt)
        Constructor.
        Parameters:
        txt - 3-character string identifying this code; conventionally the characters are upper case alphanumerics
        Throws:
        java.lang.IllegalArgumentException - if it's not three characters long
    • Method Detail

      • getCode

        public java.lang.String getCode()
        Returns the three-letter identifier for this object.
        Returns:
        3-letter code
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object