choco.kernel.solver.constraints.global.scheduling
Class FakeResource<E extends ITask>

java.lang.Object
  extended by choco.kernel.solver.constraints.global.scheduling.FakeResource<E>
All Implemented Interfaces:
IResource<E>, IResourceParameters, Serializable

public class FakeResource<E extends ITask>
extends Object
implements IResource<E>

See Also:
Serialized Form

Constructor Summary
FakeResource(E[] tasks)
           
 
Method Summary
 List<IRTask> asRTaskList()
           
 List<E> asTaskList()
          A view of the resource as an immutable list.
 int getNbOptionalTasks()
           
 int getNbRegularTasks()
           
 int getNbTasks()
           
 String getRscName()
           
 IRTask getRTask(int idx)
           
 Iterator<IRTask> getRTaskIterator()
           
 E getTask(int idx)
          get the task with the given index
 Iterator<E> getTaskIterator()
          an iterator over all tasks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeResource

public FakeResource(E[] tasks)
Method Detail

asTaskList

public List<E> asTaskList()
Description copied from interface: IResource
A view of the resource as an immutable list.

Specified by:
asTaskList in interface IResource<E extends ITask>

getNbTasks

public int getNbTasks()
Specified by:
getNbTasks in interface IResource<E extends ITask>
Specified by:
getNbTasks in interface IResourceParameters

getRscName

public String getRscName()
Specified by:
getRscName in interface IResourceParameters

getRTask

public IRTask getRTask(int idx)
Specified by:
getRTask in interface IResource<E extends ITask>

asRTaskList

public List<IRTask> asRTaskList()
Specified by:
asRTaskList in interface IResource<E extends ITask>

getTask

public E getTask(int idx)
Description copied from interface: IResource
get the task with the given index

Specified by:
getTask in interface IResource<E extends ITask>
Parameters:
idx - index of the task

getTaskIterator

public Iterator<E> getTaskIterator()
Description copied from interface: IResource
an iterator over all tasks

Specified by:
getTaskIterator in interface IResource<E extends ITask>
Returns:

getRTaskIterator

public Iterator<IRTask> getRTaskIterator()
Specified by:
getRTaskIterator in interface IResource<E extends ITask>

getNbOptionalTasks

public int getNbOptionalTasks()
Specified by:
getNbOptionalTasks in interface IResourceParameters

getNbRegularTasks

public int getNbRegularTasks()
Specified by:
getNbRegularTasks in interface IResourceParameters


Copyright © 2012. All Rights Reserved.