Class TimeChecker

java.lang.Object
microsim.statistics.TimeChecker

@Deprecated(forRemoval=true) public class TimeChecker extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
The time checker is used by all the classes implementing the IUpdatableSource interface to avoid repetitive updates.
Every time the updateSource method of the user class is invoked, it asks to TimeChecker if the update has been done yet at the current simulation time.
If the time checker is disabled it force the users to always update themselves.

Title: JAS

Description: Java Agent-based Simulation library

Copyright (C) 2002 Michele Sonnessa

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Author:
Michele Sonnessa
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the current enabling state.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    The method checks if a call has been already done at current simulation time.
    void
    setEnabled(boolean b)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable/disable the time checking.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TimeChecker

      public TimeChecker()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • isUpToDate

      public boolean isUpToDate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      The method checks if a call has been already done at current simulation time. In case it has not yet invoked it updates to current time.
      Returns:
      True if the method has not yet been invoked at the current time, false otherwise
    • isEnabled

      public boolean isEnabled()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the current enabling state.
      Returns:
      True if the time checking is enabled, false otherwise.
    • setEnabled

      public void setEnabled(boolean b)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable/disable the time checking.
      Parameters:
      b - True to enable and false to diable time checking.