From 960837fe0263e997de65c303fb9c01ed5be40142 Mon Sep 17 00:00:00 2001 From: "ShA..Rd" Date: Tue, 8 May 2012 17:45:41 +0000 Subject: [PATCH] NORMEN IS ALWAYS RIGHT git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9360 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/material/Material.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/src/core/com/jme3/material/Material.java b/engine/src/core/com/jme3/material/Material.java index 4f35800d9..81ed991a7 100644 --- a/engine/src/core/com/jme3/material/Material.java +++ b/engine/src/core/com/jme3/material/Material.java @@ -216,13 +216,15 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable { } /** - * Compares two materials and returns true if they are equal. - * This methods compare definition, parameters, additional render states + * Compares two materials and returns true if they are equal. + * This methods compare definition, parameters, additional render states. + * Since materials are mutable objects, implementing equals() properly is not possible, + * hence the name dynamicEquals(). * * @param otherObj the material to compare to this material * @return true if the materials are equal. */ - public boolean equals(Object otherObj) { + public boolean dynamicEquals(Object otherObj) { if (!(otherObj instanceof Material)) { return false; }