Author: mes
Date: 2012-04-13 14:39:00 -0700 (Fri, 13 Apr 2012)
New Revision: 28832
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/VisualPropertyUtil.java
Log:
a few risky bits of code changed to avoid problems
Modified:
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/VisualPropertyUtil.java
===================================================================
---
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/VisualPropertyUtil.java
2012-04-13 21:24:17 UTC (rev 28831)
+++
core3/api/trunk/presentation-api/src/main/java/org/cytoscape/view/presentation/property/VisualPropertyUtil.java
2012-04-13 21:39:00 UTC (rev 28832)
@@ -10,6 +10,11 @@
* @CyAPI.Static.Class
*/
public final class VisualPropertyUtil {
+
+ /**
+ * So no one else can contruct this!
+ */
+ private VisualPropertyUtil() {}
/**
* Check whether the given {@linkplain VisualProperty} is a child of
parent vp or not.
@@ -30,7 +35,7 @@
if(lexicon == null)
throw new NullPointerException("Lexicon is null.");
- if(lexicon.getAllVisualProperties().contains(vp) == false)
+ if(!lexicon.getAllVisualProperties().contains(vp))
throw new IllegalArgumentException("No such Visual
Porperty in the lexicon: " + vp.getDisplayName());
@@ -40,7 +45,7 @@
if(node.getParent() == null)
return false;
- if (vp == parent || node.getParent().getVisualProperty() ==
parent)
+ if (vp.equals(parent) ||
node.getParent().getVisualProperty().equals(parent))
return true;
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.