Who says 'hashCode()' says also 'equals()' ... Shame on me
[core.git] / inc / classes / interfaces / class_FrameworkInterface.php
index d05344a940ade0b6414b969f364ae40d9950c856..2018153d409cf0bbefea48d8c054d6cad60bac4e 100644 (file)
@@ -5,9 +5,10 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007 - 2009 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
+ * @todo               Find a better name for this interface
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,7 +32,23 @@ interface FrameworkInterface {
         * @throws      NullPointerException    If the result instance is null
         */
        function getField ($fieldName);
+
+       /**
+        * Checks wether an object equals this object. You should overwrite this
+        * method to implement own equality checks
+        *
+        * @param       $objectInstance         An instance of a FrameworkInterface object
+        * @return      $equals                         Wether both objects equals
+        */
+       function equals (FrameworkInterface $objectInstance);
+
+       /**
+        * Generates a code for hashes from this class
+        *
+        * @return      $hashCode       The hash code respresenting this class
+        */
+       function hashCode ();
 }
 
-//
+// [EOF]
 ?>