[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Grid.java, 1.4, 1.5
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2009-05-18 07:10:33
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9079/src/net/sourceforge/bprocessor/model Modified Files: Grid.java Log Message: Grid attributes Index: Grid.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Grid.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Grid.java 15 May 2009 12:46:08 -0000 1.4 --- Grid.java 18 May 2009 07:10:22 -0000 1.5 *************** *** 50,58 **** /** {@inheritDoc} */ public List<Attribute> getAttributes() { ! return new LinkedList(); } /** {@inheritDoc} */ public void setAttributes(List<Attribute> attributes) { } --- 50,68 ---- /** {@inheritDoc} */ public List<Attribute> getAttributes() { ! LinkedList<Attribute> attributes = new LinkedList(); ! attributes.add(new Attribute("Size", new Double(size))); ! attributes.add(new Attribute("Distance", new Double(delta))); ! return attributes; } /** {@inheritDoc} */ public void setAttributes(List<Attribute> attributes) { + for (Attribute current : attributes) { + if (current.getName().equals("Size")) { + size = (Double)(current.getValue()); + } else if (current.getName().equals("Distance")) { + delta = (Double)(current.getValue()); + } + } } |