net.grinder.util
Class BooleanProperty

java.lang.Object
  extended by net.grinder.util.BooleanProperty

public final class BooleanProperty
extends Object

Introspects a boolean property of a Java Bean and provides setter and getter methods.

Author:
Philip Aston

Nested Class Summary
static class BooleanProperty.PropertyException
          Indicates a problem with accessing the property.
 
Constructor Summary
BooleanProperty(Object bean, String propertyName)
          Constructor.
 
Method Summary
 boolean get()
          Getter method.
 void set(boolean value)
          Setter method.
 String toString()
          Describe the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanProperty

public BooleanProperty(Object bean,
                       String propertyName)
                throws BooleanProperty.PropertyException
Constructor.

Parameters:
bean - Bean to introspect.
propertyName - The property.
Throws:
BooleanProperty.PropertyException - If a boolean property of the given name could not be found.
Method Detail

get

public boolean get()
            throws BooleanProperty.PropertyException
Getter method.

Returns:
The current value of the property.
Throws:
BooleanProperty.PropertyException - If the value could not be read.

set

public void set(boolean value)
         throws BooleanProperty.PropertyException
Setter method.

Parameters:
value - The new value of the property.
Throws:
BooleanProperty.PropertyException - If the value could not be written.

toString

public String toString()
Describe the property.

Overrides:
toString in class Object
Returns:
A description of the property.


Copyright © 2000-2013. All Rights Reserved.