edu.rice.cs.drjava.config
Class TernaryOpProperty<O,P,Q,R>

java.lang.Object
  extended by edu.rice.cs.drjava.config.DrJavaProperty
      extended by edu.rice.cs.drjava.config.EagerProperty
          extended by edu.rice.cs.drjava.config.TernaryOpProperty<O,P,Q,R>
All Implemented Interfaces:
Cloneable

public class TernaryOpProperty<O,P,Q,R>
extends EagerProperty

Class representing ternary operations that can be inserted as variables in external processes.

Version:
$Id$

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.rice.cs.drjava.config.DrJavaProperty
DrJavaProperty.InfiniteLoopException
 
Field Summary
protected  Lambda<R,String> _format
          Lambda to format the result.
protected  Lambda3<O,P,Q,R> _op
          Operation to perform.
protected  String _op1Default
          Operator 1 default
protected  String _op1Name
          Operator 1 name
protected  String _op2Default
          Operator 2 default
protected  String _op2Name
          Operator 2 name
protected  String _op3Default
          Operator 3 default
protected  String _op3Name
          Operator 3 name
protected  Lambda<String,O> _parse1
          Lambda to turn a string into the first operand.
protected  Lambda<String,P> _parse2
          Lambda to turn a string into the second operand.
protected  Lambda<String,Q> _parse3
          Lambda to turn a string into the third operand.
 
Fields inherited from class edu.rice.cs.drjava.config.DrJavaProperty
_attributes, _help, _isCurrent, _listening, _name, _value, DEACTIVATED_DUE_TO_ERROR
 
Constructor Summary
TernaryOpProperty(String name, String help, Lambda3<O,P,Q,R> op, Lambda<String,O> parse1, Lambda<String,P> parse2, Lambda<String,Q> parse3, Lambda<R,String> format)
          Create an eager property.
TernaryOpProperty(String name, String help, Lambda3<O,P,Q,R> op, String op1Name, String op1Default, Lambda<String,O> parse1, String op2Name, String op2Default, Lambda<String,P> parse2, String op3Name, String op3Default, Lambda<String,Q> parse3, Lambda<R,String> format)
          Create an eager property.
 
Method Summary
 void resetAttributes()
          Reset attributes to their defaults.
 void update(PropertyMaps pm)
          Update the property so the value is current.
 
Methods inherited from class edu.rice.cs.drjava.config.EagerProperty
getLazy, isCurrent
 
Methods inherited from class edu.rice.cs.drjava.config.DrJavaProperty
_invalidate, equals, getAttribute, getCurrent, getHelp, getName, hashCode, invalidate, invalidateOthers, listenToInvalidatesOf, setAttribute, setAttributes, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_op

protected Lambda3<O,P,Q,R> _op
Operation to perform.


_op1Name

protected String _op1Name
Operator 1 name


_op1Default

protected String _op1Default
Operator 1 default


_op2Name

protected String _op2Name
Operator 2 name


_op2Default

protected String _op2Default
Operator 2 default


_op3Name

protected String _op3Name
Operator 3 name


_op3Default

protected String _op3Default
Operator 3 default


_parse1

protected Lambda<String,O> _parse1
Lambda to turn a string into the first operand.


_parse2

protected Lambda<String,P> _parse2
Lambda to turn a string into the second operand.


_parse3

protected Lambda<String,Q> _parse3
Lambda to turn a string into the third operand.


_format

protected Lambda<R,String> _format
Lambda to format the result.

Constructor Detail

TernaryOpProperty

public TernaryOpProperty(String name,
                         String help,
                         Lambda3<O,P,Q,R> op,
                         String op1Name,
                         String op1Default,
                         Lambda<String,O> parse1,
                         String op2Name,
                         String op2Default,
                         Lambda<String,P> parse2,
                         String op3Name,
                         String op3Default,
                         Lambda<String,Q> parse3,
                         Lambda<R,String> format)
Create an eager property.


TernaryOpProperty

public TernaryOpProperty(String name,
                         String help,
                         Lambda3<O,P,Q,R> op,
                         Lambda<String,O> parse1,
                         Lambda<String,P> parse2,
                         Lambda<String,Q> parse3,
                         Lambda<R,String> format)
Create an eager property.

Method Detail

update

public void update(PropertyMaps pm)
Update the property so the value is current.

Specified by:
update in class DrJavaProperty
Parameters:
pm - PropertyMaps used for substitution when replacing variables

resetAttributes

public void resetAttributes()
Description copied from class: DrJavaProperty
Reset attributes to their defaults. Should be overridden by properties that use attributes.

Overrides:
resetAttributes in class DrJavaProperty