@@ -0,0 +1,1841 @@
+/*%0A * JaamSim Discrete Event Simulation%0A * Copyright (C) 2018 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%0Aimport com.jaamsim.Graphics.DisplayEntity;%0Aimport com.jaamsim.states.StateUser;%0A%0A/**%0A * Provides a common interface for objects that store entities.%0A * @author Harry King%0A *%0A */%0Apublic interface EntContainer extends StateUser %7B%0A%0A%09/**%0A%09 * Adds the specified entity to the container.%0A%09 */%0A%09public void addEntity(DisplayEntity ent);%0A%0A%09/**%0A%09 * Removes the first entity of the specified type in the container.%0A%09 * If the type is null, then the first entity is removed regardless of type.%0A%09 * string.%0A%09 * @param type - entity type%0A%09 * @return entity that was removed%0A%09 */%0A%09public DisplayEntity removeEntity(String type);%0A%0A%09/**%0A%09 * Returns the number of entities of the specified type in the container.%0A%09 * If the type is null, then all entities are counted.%0A%09 * @param type - entity type%0A%09 * @return number of entities of the specified type%0A%09 */%0A%09public int getCount(String type);%0A%0A%09/**%0A%09 * Returns whether the container has any entities of the specified type.%0A%09 * If the type is null, then all entities are considered.%0A%09 * @param type - entity type%0A%09 * @return true if there is at least one entity of the specified type%0A%09 */%0A%09public boolean isEmpty(String type);%0A%0A%7D%0A

add the EntContainer interface