PathwayLogic Assistant API

pla.data
Class Setting

java.lang.Object
  extended by pla.data.NamedThing
      extended by pla.data.Setting
All Implemented Interfaces:
Comparable

public class Setting
extends NamedThing

Author:
linda

Constructor Summary
Setting(String name, String verb, Class leafClass, String attr)
          Construct a Category.
 
Method Summary
static void addContradict(Setting s1, Setting s2)
          Add a contradiction between the two given settings.
 boolean contradicts(Setting s)
          Tests whether the given setting is in contradiction with this one.
 boolean equals(Object o)
           
 Class getLeafClass()
           
 String getStatusAttr()
           
 String getVerb()
           
static void removeContradict(Setting s1, Setting s2)
          Remove contradiction between two given settings.
 String toString()
           
 
Methods inherited from class pla.data.NamedThing
compareTo, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Setting

public Setting(String name,
               String verb,
               Class leafClass,
               String attr)
Construct a Category. The given name must be non-null and non-empty (after trimming), otherwise constructor throws a RuntimeException. Initialize empty list of categories.

Parameters:
name - String containing name
verb -
leafClass -
attr -
Method Detail

addContradict

public static void addContradict(Setting s1,
                                 Setting s2)
Add a contradiction between the two given settings. A contradiction means that when selecting an occurrence within one setting, it will disable the same occurrence in the contradicting setting. Likewise, when deselecting an occurrence in one setting, it will re-enable the same occurrence in the contradicting setting.

The "contradicts" relation is symmetric.

Parameters:
s1 - Setting that is contradiction to s2
s2 - Setting that is contradiction to s1

removeContradict

public static void removeContradict(Setting s1,
                                    Setting s2)
Remove contradiction between two given settings.

The "contradicts" relation is symmetric.

Parameters:
s1 - Setting that was contradiction to s2
s2 - Setting that was contradiction to s1

contradicts

public boolean contradicts(Setting s)
Tests whether the given setting is in contradiction with this one.

Parameters:
s - Setting to be tested for contradiction
Returns:
true if given setting contradicts this one, false otherwise

getLeafClass

public Class getLeafClass()

getVerb

public String getVerb()

getStatusAttr

public String getStatusAttr()

toString

public String toString()
Overrides:
toString in class NamedThing

equals

public boolean equals(Object o)
Overrides:
equals in class NamedThing

PathwayLogic Assistant API