org.joda.beans
Enum PropertyStyle

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

public enum PropertyStyle
extends Enum<PropertyStyle>

An enumeration of property styles.

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

It is strongly recommended to use the methods, not compare against the enum values.


Enum Constant Summary
DERIVED
          The property is derived.
IMMUTABLE
          The property is immutable.
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 isBuildable()
          Checks whether the property can be used in the builder.
 boolean isDerived()
          Checks whether the property is derived.
 boolean isReadable()
          Checks whether the property is readable.
 boolean isSerializable()
          Checks whether the property can be serialized in a round-trip.
 boolean isWritable()
          Checks whether the property is writable.
static PropertyStyle valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PropertyStyle[] 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 PropertyStyle READ_WRITE
The property can be read and written.


READ_ONLY

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


WRITE_ONLY

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


DERIVED

public static final PropertyStyle DERIVED
The property is derived. It is read-only.


IMMUTABLE

public static final PropertyStyle IMMUTABLE
The property is immutable. It can be read and written via the builder.

Method Detail

values

public static PropertyStyle[] 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 (PropertyStyle c : PropertyStyle.values())
    System.out.println(c);

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

valueOf

public static PropertyStyle 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

isBuildable

public boolean isBuildable()
Checks whether the property can be used in the builder.

Returns:
true if the property can be used in the builder

isDerived

public boolean isDerived()
Checks whether the property is derived.

Returns:
true if the property is derived

isSerializable

public boolean isSerializable()
Checks whether the property can be serialized in a round-trip.

Returns:
true if the property is serializable


Copyright © 2007–2013 Joda.org. All rights reserved.