Author: kono
Date: 2010-08-12 15:57:30 -0700 (Thu, 12 Aug 2010)
New Revision: 21363
Modified:
core3/viewmodel-impl/trunk/src/main/java/org/cytoscape/view/model/internal/ViewImpl.java
Log:
Validator added in the constructor.
Modified:
core3/viewmodel-impl/trunk/src/main/java/org/cytoscape/view/model/internal/ViewImpl.java
===================================================================
---
core3/viewmodel-impl/trunk/src/main/java/org/cytoscape/view/model/internal/ViewImpl.java
2010-08-12 22:51:37 UTC (rev 21362)
+++
core3/viewmodel-impl/trunk/src/main/java/org/cytoscape/view/model/internal/ViewImpl.java
2010-08-12 22:57:30 UTC (rev 21363)
@@ -30,6 +30,11 @@
public ViewImpl(final M model, final CyEventHelper cyEventHelper) {
+ if(model == null)
+ throw new IllegalArgumentException("Data model cannot
be null.");
+ if(cyEventHelper == null)
+ throw new IllegalArgumentException("CyEventHelper is
null.");
+
this.suid = SUIDFactory.getNextSUID();
this.model = model;
this.cyEventHelper = cyEventHelper;
@@ -38,6 +43,7 @@
this.visualPropertyLocks = new HashMap<VisualProperty<?>,
Object>();
}
+
@Override
public M getModel() {
return model;
--
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.