org.joda.beans
Enum ReadWriteProperty

java.lang.Object
  extended by java.lang.Enum<ReadWriteProperty>
      extended by org.joda.beans.ReadWriteProperty
All Implemented Interfaces:
Serializable, Comparable<ReadWriteProperty>

public enum ReadWriteProperty
extends Enum<ReadWriteProperty>

An enumeration of read-write property types.

A property may be read-only, read-write or write-only. This enumeration models those options.

Author:
Stephen Colebourne

Enum Constant Summary
READ_ONLY
          The property is read-only.
READ_WRITE
          The property can be read and written.
WRITE_ONLY
          The property is write-only.
 
Method Summary
 boolean isReadable()
          Checks whether the property is readable.
 boolean isWritable()
          Checks whether the property is writable.
static ReadWriteProperty valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ReadWriteProperty[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

READ_WRITE

public static final ReadWriteProperty READ_WRITE
The property can be read and written.


READ_ONLY

public static final ReadWriteProperty READ_ONLY
The property is read-only.


WRITE_ONLY

public static final ReadWriteProperty WRITE_ONLY
The property is write-only.

Method Detail

values

public static ReadWriteProperty[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ReadWriteProperty c : ReadWriteProperty.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ReadWriteProperty valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isReadable

public boolean isReadable()
Checks whether the property is readable.

Returns:
true if the property can be read

isWritable

public boolean isWritable()
Checks whether the property is writable.

Returns:
true if the property can be written


Copyright © 2007-2010 Joda.org. All Rights Reserved.