# Class TapLimit

java.lang.Object
uk.ac.starlink.vo.TapLimit

public class TapLimit extends Object
Characterises a limit which applies to a TAP service. This class can represent values encoded by the TAPRegExt DataLimits and TimeLimits element types.

Since:
  8 Mar 2011
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`BYTES`
Unit string used for a data limit of bytes ("byte").
`static final String`
`ROWS`
Unit string used for a data limit of rows ("row").
`static final String`
`SECONDS`
Unit string used always for time limits ("seconds").

## Constructor Summary

Constructors
Constructor
Description
`TapLimit(long value, boolean isHard, String unit)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`getUnit()`
Returns the limit unit.
`long`
`getValue()`
Returns the limit value.
`boolean`
`isHard()`
Indicates whether this is a hard or soft (default) limit.
`String`
`toString()`

### Methods inherited from class Object

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

## Field Details

### SECONDS

public static final String SECONDS
Unit string used always for time limits ("seconds").

See Also:
  - Constant Field Values

### ROWS

public static final String ROWS
Unit string used for a data limit of rows ("row").

See Also:
  - Constant Field Values

### BYTES

public static final String BYTES
Unit string used for a data limit of bytes ("byte").

See Also:
  - Constant Field Values

## Constructor Details

### TapLimit

public TapLimit(long value, boolean isHard, String unit)
Constructor.

Parameters:
  `value` - limit value
  `isHard` - true for a hard limit, false for a default limit
  `unit` - unit for value

## Method Details

### getValue

public long getValue()
Returns the limit value.

Returns:
  limit value

### isHard

public boolean isHard()
Indicates whether this is a hard or soft (default) limit.

Returns:
  true for hard limit, false for default limit

### getUnit

public String getUnit()
Returns the limit unit. Should be `SECONDS` for time limits, and either `ROWS` or `BYTES` for data limits.

Returns:
  limit unit

### toString

public String toString()

Overrides:
  `toString` in class `Object`