Class AccessMode


  • public class AccessMode
    extends java.lang.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 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isReadable()
      Indicates whether this mode includes read access.
      boolean isWritable()
      Indicates whether this mode includes write access.
      java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object