jopt.js.api.variable
Interface ResourceSet


public interface ResourceSet

This is a class to represent a set of resources that is possible for a given operation (require, produces, etc) of an activity and allows selecting one of them as the resource to actually be used.

Author:
jboerkoel

Method Summary
 void assignTo(int index)
          Assigns the activity to use the resource at the given index
 Resource get(int index)
          Returns a representation of the resource at the specified index.
 void removeAt(int index)
          Removes the resource at the given index for the activity
 int size()
          Returns the number of equivalent resources (ie the number of resources in this set)
 

Method Detail

size

public int size()
Returns the number of equivalent resources (ie the number of resources in this set)

Returns:
the number of possible resources that can be used in place of each other

get

public Resource get(int index)
Returns a representation of the resource at the specified index.

Parameters:
index - index of resource being inquired about
Returns:
Resource located at specified index

assignTo

public void assignTo(int index)
              throws jopt.csp.variable.PropagationFailureException
Assigns the activity to use the resource at the given index

Parameters:
index - index of resource
Throws:
jopt.csp.variable.PropagationFailureException

removeAt

public void removeAt(int index)
              throws jopt.csp.variable.PropagationFailureException
Removes the resource at the given index for the activity

Parameters:
index - index of resource
Throws:
jopt.csp.variable.PropagationFailureException