uk.ac.starlink.array
Class AccessMode

java.lang.Object
  extended by 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
static AccessMode READ
          Object representing read-only access.
static AccessMode UPDATE
          Object representing update (read and write) access.
static AccessMode WRITE
          Object representing write-only access.
 
Method Summary
 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 Detail

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 Detail

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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.