Package uk.ac.starlink.array

# Class AccessMode

java.lang.Object
uk.ac.starlink.array.AccessMode

public class AccessMode extends Object
Access mode identifier. Objects in this class are used to indicate what kind of access is required for a requested array object. This class exemplifies the typesafe enum pattern -- the only possible instances are supplied as static final fields of the class, and these instances are immutable.

Author:
  Mark Taylor (Starlink)

## Field Summary

Fields
Modifier and Type
Field
Description
`static final AccessMode`
`READ`
Object representing read-only access.
`static final AccessMode`
`UPDATE`
Object representing update (read and write) access.
`static final AccessMode`
`WRITE`
Object representing write-only access.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isReadable()`
Indicates whether this mode includes read access.
`boolean`
`isWritable()`
Indicates whether this mode includes write access.
`String`
`toString()`

### Methods inherited from class java.lang.Object

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

## Field Details

### READ

public static final AccessMode READ
Object representing read-only access.

### UPDATE

public static final AccessMode UPDATE
Object representing update (read and write) access.

### WRITE

public static final AccessMode WRITE
Object representing write-only access.

## Method Details

### isReadable

public boolean isReadable()
Indicates whether this mode includes read access.

Returns:
  true for READ and UPDATE, false for WRITE

### isWritable

public boolean isWritable()
Indicates whether this mode includes write access.

Returns:
  true for WRITE and UPDATE, false for READ

### toString

public String toString()

Overrides:
  `toString` in class `Object`