From: <chr...@us...> - 2006-12-10 22:09:57
|
Revision: 1047 http://svn.sourceforge.net/gridarta/?rev=1047&view=rev Author: christianhujer Date: 2006-12-10 14:09:57 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Minor improvements. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java Modified: trunk/src/app/net/sf/gridarta/gameobject/GameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 21:54:22 UTC (rev 1046) +++ trunk/src/app/net/sf/gridarta/gameobject/GameObject.java 2006-12-10 22:09:57 UTC (rev 1047) @@ -680,10 +680,8 @@ public abstract G getHead(); /** - * Determine if this part is the head part. For single-part objects this is - * always true. - * - * @return <code>true</code> iff this part if a head part + * Returns whether this object is a single-part object or the head of the multi-part object. + * @return <code>true</code> if single-part or head of multi-part, otherwise <code>false</code>. */ public boolean isHead() { return getHead() == this; @@ -740,10 +738,11 @@ */ public String getBestName() { final Archetype<G> archetype = getArchetype(); + final String archObjName = archetype.getObjName(); if (objName != null && objName.length() > 0) { return objName; - } else if (archetype.getObjName() != null && archetype.getObjName().length() > 0) { - return archetype.getObjName(); + } else if (archObjName != null && archObjName.length() > 0) { + return archObjName; } else if (archetypeName != null && archetypeName.length() > 0) { return archetypeName; } else if (archetype.getArchetypeName() != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |