Joda System API

org.joda.property.type
Interface BooleanicProperty

All Superinterfaces:
DataProperty, ModelElement, Property, java.io.Serializable
All Known Subinterfaces:
BooleanPrimitiveProperty, BooleanProperty
All Known Implementing Classes:
AbstractBooleanicProperty, DefaultBooleanPrimitiveProperty, DefaultBooleanProperty

public interface BooleanicProperty
extends DataProperty

BooleanicProperty holds the same position as NumericProperty for numbers. It is the superinterface for all properties that can have a true/false value.

Author:
Stephen Colebourne

Nested Class Summary
 
Nested classes inherited from class org.joda.property.Property
Property.Internal
 
Method Summary
 boolean booleanValue()
          Get the property's value as a boolean.
 boolean isFalse()
          Is the property value currently in a 'false' state.
 boolean isTrue()
          Is the property value currently in a 'true' state.
 void negate()
          Negate the current value of the property.
 void set(boolean propertyValue)
          Set the property's value.
 java.lang.Boolean toBoolean()
          Get the property's value as a Boolean.
 
Methods inherited from interface org.joda.property.type.DataProperty
toDataString
 
Methods inherited from interface org.joda.property.Property
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getContentName, getContentType, getPropertyName, getPropertyType, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, set, setModifiable, setReadOnly, toObject, toString
 
Methods inherited from interface org.joda.property.ModelElement
getAttribute, getAttributeCount, getAttributeMap, setAttribute
 

Method Detail

booleanValue

public boolean booleanValue()
Get the property's value as a boolean.

Returns:
the property value as a boolean
Throws:
java.lang.IllegalStateException - if this is not possible

toBoolean

public java.lang.Boolean toBoolean()
Get the property's value as a Boolean.

Returns:
the property value as a Boolean

isTrue

public boolean isTrue()
Is the property value currently in a 'true' state. Note that is perfectly possible for both isTrue() and isFalse() to return false at the same time, but they cannot both return true. No exceptions are thrown.

Returns:
true if the property is currently 'true'

isFalse

public boolean isFalse()
Is the property value currently in a 'false' state. Note that is perfectly possible for both isTrue() and isFalse() to return false at the same time, but they cannot both return true. No exceptions are thrown.

Returns:
true if the property is currently false

set

public void set(boolean propertyValue)
Set the property's value.

Parameters:
propertyValue - a value to set the property's value to

negate

public void negate()
Negate the current value of the property. If the value is currently null, it will be unchanged and no exception will be thrown.


Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.