Package jmri.jmrit.ussctc
Class OccupancyLock
- java.lang.Object
-
- jmri.jmrit.ussctc.OccupancyLock
-
- All Implemented Interfaces:
Lock
public class OccupancyLock extends java.lang.Object implements Lock
Lock if any of a list of sensors isn't INACTIVE.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.jmrit.ussctc.Lock
Lock.Valid
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<NamedBeanHandle<Sensor>>
list
-
Fields inherited from interface jmri.jmrit.ussctc.Lock
debugLockLogger, signalLockLogger, turnoutLockLogger
-
-
Constructor Summary
Constructors Constructor Description OccupancyLock(java.lang.String sensor)
OccupancyLock(java.lang.String[] array)
OccupancyLock(java.util.List<NamedBeanHandle<Sensor>> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLockClear(LockLogger lockLogger)
Test the lock conditionsjava.lang.String
toString()
-
-
-
Field Detail
-
list
java.util.List<NamedBeanHandle<Sensor>> list
-
-
Constructor Detail
-
OccupancyLock
public OccupancyLock(java.util.List<NamedBeanHandle<Sensor>> list)
-
OccupancyLock
public OccupancyLock(java.lang.String[] array)
-
OccupancyLock
public OccupancyLock(java.lang.String sensor)
-
-
Method Detail
-
isLockClear
public boolean isLockClear(LockLogger lockLogger)
Test the lock conditions- Specified by:
isLockClear
in interfaceLock
- Parameters:
lockLogger
- the logger on which to emit status messages- Returns:
- True if lock is clear and operation permitted
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-