# Class VotLintCode

java.lang.Object
uk.ac.starlink.ttools.votlint.VotLintCode

public class VotLintCode extends 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(String txt)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`String`
`getCode()`
Returns the three-letter identifier for this object.
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### VotLintCode

public VotLintCode(String txt)
Constructor.

Parameters:
  `txt` - 3-character string identifying this code; conventionally the characters are upper case alphanumerics
Throws:
  `IllegalArgumentException` - if it's not three characters long

## Method Details

### getCode

public String getCode()
Returns the three-letter identifier for this object.

Returns:
  3-letter code

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`