zeus.concepts
Class ResourceItem

java.lang.Object
  extended byjava.util.Observable
      extended byzeus.concepts.ResourceItem

public class ResourceItem
extends java.util.Observable


Nested Class Summary
protected  class ResourceItem.Entry
           
 
Field Summary
static java.lang.String ALLOCATED
           
static int DELETE
           
protected  Fact fact
           
static int MODIFY
           
protected  java.util.Hashtable reservations
           
static java.lang.String UNALLOCATED
           
static int UNCHANGED
           
 
Fields inherited from class java.util.Observable
 
Constructor Summary
ResourceItem(Fact fact)
           
 
Method Summary
 void cancelReservation(java.util.Observer observer)
           
 void changeReservedAmount(java.util.Observer o, int amount)
           
 int consumed(java.util.Observer observer)
           
 void deleted()
           
 boolean executeNow(java.util.Observer observer, int now)
           
 Fact getFact()
           
 int getReservedAmount(java.util.Observer observer)
           
 boolean isReserved()
           
 boolean newStartTime(java.util.Observer observer, int start)
           
 boolean reservationOK(int start, boolean consumed, int amount)
           
 boolean reserve(java.util.Observer observer, int start, boolean consumed, int amount)
           
 int reservedAmount(int start, boolean consumed)
           
 int unreservedAmount(int start, boolean consumed)
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOCATED

public static final java.lang.String ALLOCATED
See Also:
Constant Field Values

UNALLOCATED

public static final java.lang.String UNALLOCATED
See Also:
Constant Field Values

UNCHANGED

public static final int UNCHANGED
See Also:
Constant Field Values

MODIFY

public static final int MODIFY
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

fact

protected Fact fact

reservations

protected java.util.Hashtable reservations
Constructor Detail

ResourceItem

public ResourceItem(Fact fact)
Method Detail

getFact

public Fact getFact()

isReserved

public boolean isReserved()

reservationOK

public boolean reservationOK(int start,
                             boolean consumed,
                             int amount)

unreservedAmount

public int unreservedAmount(int start,
                            boolean consumed)

reservedAmount

public int reservedAmount(int start,
                          boolean consumed)

getReservedAmount

public int getReservedAmount(java.util.Observer observer)

changeReservedAmount

public void changeReservedAmount(java.util.Observer o,
                                 int amount)

cancelReservation

public void cancelReservation(java.util.Observer observer)

executeNow

public boolean executeNow(java.util.Observer observer,
                          int now)

newStartTime

public boolean newStartTime(java.util.Observer observer,
                            int start)

reserve

public boolean reserve(java.util.Observer observer,
                       int start,
                       boolean consumed,
                       int amount)

deleted

public void deleted()

consumed

public int consumed(java.util.Observer observer)


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.