org.commonreality.time.impl
Class OwnedClock<T>
java.lang.Object
org.commonreality.time.impl.BasicClock
org.commonreality.time.impl.OwnedClock<T>
- All Implemented Interfaces:
- IClock, IOwnableClock<T>, ISetableClock
- Direct Known Subclasses:
- MasterClock, SharedClock
public class OwnedClock<T>
- extends BasicClock
- implements IOwnableClock<T>
- Author:
- developer
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OwnedClock
public OwnedClock()
addOwner
public void addOwner(T owner)
- Specified by:
addOwner in interface IOwnableClock<T>
- See Also:
IOwnableClock.addOwner(java.lang.Object)
getOwners
public java.util.Collection<T> getOwners()
- Specified by:
getOwners in interface IOwnableClock<T>
- See Also:
IOwnableClock.getOwners()
isOwner
public boolean isOwner(T owner)
- Specified by:
isOwner in interface IOwnableClock<T>
- See Also:
IOwnableClock.isOwner(java.lang.Object)
removeOwner
public void removeOwner(T owner)
- Specified by:
removeOwner in interface IOwnableClock<T>
- See Also:
IOwnableClock.removeOwner(java.lang.Object)
setTime
public double setTime(T owner,
double requestedTime)
- Parameters:
owner - requestedTime -
- Returns:
- the current time
setTime
public double setTime(double newTime)
- Description copied from class:
BasicClock
- set the time and signal
- Specified by:
setTime in interface ISetableClock- Overrides:
setTime in class BasicClock