# Class Tick

java.lang.Object
uk.ac.starlink.ttools.plot2.Tick

@Equality public class Tick extends Object
Defines a tick on an axis. A tick has a numerical value, used for positioning, and optionally a text label. Ticks with no label are considered minor.

Since:
  12 Feb 2013
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`Tick(double value)`
Constructs a minor tick.
`Tick(double value, Caption label)`
Constructs a tick.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`Caption`
`getLabel()`
Returns this tick's text label.
`double`
`getValue()`
Returns this tick's numeric value.
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class Object

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

## Constructor Details

### Tick

public Tick(double value)
Constructs a minor tick. This has no text label.

Parameters:
  `value` - numeric value

### Tick

public Tick(double value, Caption label)
Constructs a tick. As long as the label is non-null, this is considered a major tick.

Parameters:
  `value` - numeric value
  `label` - tick label

## Method Details

### getValue

public double getValue()
Returns this tick's numeric value.

Returns:
  value

### getLabel

public Caption getLabel()
Returns this tick's text label.

Returns:
  tick label

### 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`