edu.washington.cs.supple.render
Interface FactoredCostFunction

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
AbstractFactoredCostFunction

public interface FactoredCostFunction
extends java.lang.Cloneable, java.io.Serializable

Author:
kgajos Common interface for all factored cost functions

Method Summary
 java.lang.Object clone()
           
 Factor getFactorByName(java.lang.String name)
          Lets you retrieve a factor by its name
 java.util.Collection getFactors()
          Returns all factors
 java.util.Collection getFactors(java.util.Collection widgets)
          Returns relevant factors
 java.util.Collection getFactors(SuppleType type, UiObject uiObject, java.util.Collection descriptors)
          Returns relevant factors
 java.util.Collection getFactors(SuppleType type, UiObject uiObject, WidgetDescriptor descriptor)
          Returns relevant factors
 java.util.Collection getFactors(Widget widget)
          Returns relevant factors
 java.lang.String prettyPrint()
           
 void setState(FactoredCostFunctionState state)
           
 

Method Detail

getFactors

public java.util.Collection getFactors()
Returns all factors


getFactors

public java.util.Collection getFactors(java.util.Collection widgets)
Returns relevant factors

Parameters:
widgets - a collection of widgets for which we want to find factors

getFactors

public java.util.Collection getFactors(SuppleType type,
                                       UiObject uiObject,
                                       java.util.Collection descriptors)
Returns relevant factors

Parameters:
type -
uiObject -
descriptors - a collection of widget descriptors for which we want to find factors (all descriptors are for widgets for the same ui object)
Returns:

getFactors

public java.util.Collection getFactors(Widget widget)
Returns relevant factors

Parameters:
widget - a widget for which we want to find factors

getFactors

public java.util.Collection getFactors(SuppleType type,
                                       UiObject uiObject,
                                       WidgetDescriptor descriptor)
Returns relevant factors

Parameters:
type -
uiObject -
descriptor - descriptor of a widget for which we want to find factors
Returns:

getFactorByName

public Factor getFactorByName(java.lang.String name)
Lets you retrieve a factor by its name

Parameters:
name - factor's name
Returns:
factor (or null, if none found by this name)

setState

public void setState(FactoredCostFunctionState state)

prettyPrint

public java.lang.String prettyPrint()

clone

public java.lang.Object clone()