Ascent Phase Corp.

org.ascentphase.suit
Class MutexOptionGroup

java.lang.Object
  |
  +--org.ascentphase.suit.MutexOptionGroup

public class MutexOptionGroup
extends java.lang.Object

A MutexOptionGroup contains one or more MutexOptions and makes sure that only one MutexOptioin is active at a time.

Version:
Author:
huyd

Constructor Summary
MutexOptionGroup()
          Default constructor.
 
Method Summary
 void add(org.ascentphase.suit.MutexOption mo)
          Adds the given MutexOption to the group.
 void add(org.ascentphase.suit.MutexOption mo, boolean state)
           
 org.ascentphase.suit.MutexOption getActiveOption()
          Returns the active MutexOption in the group.
 void setActiveOption(org.ascentphase.suit.MutexOption mo)
          Sets the given MutexOption as the active option in the group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutexOptionGroup

public MutexOptionGroup()
Default constructor.

Method Detail

add

public void add(org.ascentphase.suit.MutexOption mo)
Adds the given MutexOption to the group.

Parameters:
mo - the MutexOption.

add

public void add(org.ascentphase.suit.MutexOption mo,
                boolean state)

setActiveOption

public void setActiveOption(org.ascentphase.suit.MutexOption mo)
Sets the given MutexOption as the active option in the group. The MutexOption must already be part of the group, or else nothing happens.

Parameters:
mo - the MutexOption to set active.

getActiveOption

public org.ascentphase.suit.MutexOption getActiveOption()
Returns the active MutexOption in the group. If no option is active, the method will return null.

Returns:
the active MutexOption, otherwise null for none.

Ascent Phase Corp.

Copyright © 2002 Ascent Phase Corp. All Rights Reserved.