# Class Rounding

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.Rounding

@Equality public abstract class Rounding extends Object
Defines a policy for coming up with round numbers.

Since:
  1 Feb 2017
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static Rounding`
`DECIMAL`
Policy suitable for normal numeric axes.
`static Rounding`
`SECONDS`
Policy suitable for time axes with data units of seconds.

## Constructor Summary

Constructors
Constructor
Description
`Rounding()`

## Method Summary

Modifier and Type
Method
Description
`abstract Rounder`
`getRounder(boolean isLog)`
Returns a rounder object for linear/logarithmic rounding.
`static Rounding`
`getRounding(boolean isTime)`
Returns a suitable implementation for an axis that either is or is not a time axis.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DECIMAL

public static Rounding DECIMAL
Policy suitable for normal numeric axes.

### SECONDS

public static Rounding SECONDS
Policy suitable for time axes with data units of seconds.

## Constructor Details

### Rounding

public Rounding()

## Method Details

### getRounder

public abstract Rounder getRounder(boolean isLog)
Returns a rounder object for linear/logarithmic rounding.

Parameters:
  `isLog` - true for logarithmic, false for linear
Returns:
  rounder

### getRounding

public static Rounding getRounding(boolean isTime)
Returns a suitable implementation for an axis that either is or is not a time axis.

Parameters:
  `isTime` - true for time axis in seconds, false for normal numeric
Returns:
  rounding instance