@@ -0,0 +1,1781 @@
+/*%0A * JaamSim Discrete Event Simulation%0A * Copyright (C) 2017 JaamSim Software Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.jaamsim.ProcessFlow;%0A%0Apublic interface ResourceUser %7B%0A%0A%09/**%0A%09 * Returns whether the specified Resource can be seized by this object.%0A%09 * @param res - Resource to be seized.%0A%09 * @return true if the specified Resource can be seized.%0A%09 */%0A%09public abstract boolean requiresResource(Resource res);%0A%0A%09/**%0A%09 * Returns whether there is an eligible entity that is waiting to seize one or more Resources.%0A%09 * @return true if an entity is waiting%0A%09 */%0A%09public abstract boolean hasWaitingEntity();%0A%0A%09/**%0A%09 * Returns the priority of the first eligible entity that is waiting to seize Resources.%0A%09 * @return priority%0A%09 */%0A%09public abstract int getPriority();%0A%0A%09/**%0A%09 * Returns the time that the first eligible entity has been waiting to seize Resources.%0A%09 * @return wait time%0A%09 */%0A%09public abstract double getWaitTime();%0A%0A%09/**%0A%09 * Returns whether sufficient Resources are available to start processing the next entity.%0A%09 * @return true if the next entity can start%0A%09 */%0A%09public abstract boolean isReadyToStart();%0A%0A%09/**%0A%09 * Seizes the Resources for the next entity and begins its processing.%0A%09 */%0A%09public abstract void startNextEntity();%0A%7D%0A

add an interface for objects that seize and release Resources