Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.laf.genes.mutators
Class Classifier

    java.lang.Object
      com.bea.netuix.laf.genes.mutators.Classifier

All Implemented Interfaces
  Mutator, Serializable

    public class Classifier

extends Object
implements Mutator

`Classifier` performs selective evaluation of gene values based on client classifications. Arguments to this mutator are target genes to be evaluated based on client classification matches. For example:

     <gene name="foo">
      <value>defaultValue</value>
      <mutator name="classifier">
       <arg name="ie">ie-gene</arg>
       <arg name="mozilla">moz-gene</arg>
      </mutator>
     </gene>
     <gene name="ie-gene">
      <value>ieValue</value>
     </gene>
     <gene name="moz-gene">
      <value>mozillaValue</value>
     </gene>

If the client is classified as "ie", this mutator will return the value of the gene named "ie-gene". If the client classification does not match any of the specified arguments, the value of the gene itself is returned.

See Also
  `ClientClassifier`, Serialized Form

Method Summary
`String` | `mutate(String mutatorName, String currentValue, Gene gene, Map<String,String> args, MutationContext context)` Performs selective evaulation of specified genes based on client classification.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### mutate

    public String mutate(String mutatorName,
                         String currentValue,
                         Gene gene,
                         Map<String,String> args,
                         MutationContext context)
                  throws MutationException

  Performs selective evaulation of specified genes based on client classification. The following arguments are supported by this mutator:

  argument | required? | value | notes
  --- | --- | --- | ---
  any client classificaiton name | no | name of target gene to evaluate | multiple client classifications can be specified as separate arguments

  Specified by:
    `mutate` in interface `Mutator`
  Parameters
    `mutatorName` - Ignored
    `currentValue` - default value to use if no argument matches the current classification
    `args` - See above
    `gene` - The gene being mutated
    `context` - The context for mutation
  Returns
    The classified gene value
  Throws
    `MutationException` - If there is a problem with the mutation process

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved