[Bprocessor-commit] /model/src/net/sourceforge/bprocessor/model Space.java, 1.132, 1.133
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2007-04-14 14:59:43
|
Update of /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2709/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: needed a way to get space level into a reasonable string Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** Space.java 11 Apr 2007 08:44:58 -0000 1.132 --- Space.java 14 Apr 2007 14:59:34 -0000 1.133 *************** *** 1271,1279 **** * class="net.sourceforge.bprocessor.model.Surface" */ ! public Set getEnvelope() { if (envelope != null) { return envelope; } else { ! return new HashSet(); } } --- 1271,1279 ---- * class="net.sourceforge.bprocessor.model.Surface" */ ! public Set<Surface> getEnvelope() { if (envelope != null) { return envelope; } else { ! return Collections.emptySet(); } } *************** *** 2753,2755 **** --- 2753,2784 ---- return new Mesh(surfaces, edges, vertices); } + + /** + * A method the can convert a level of a space to the string rep for it + * @param level2 the level + * @return the sting representation + */ + public static String levelToSting(int level2) { + String res = ""; + switch (level2) { + case PROJECT_LEVEL: + res += "Project"; + break; + case SPACE_LEVEL: + res += "Space"; + break; + case ELEMENT_LEVEL: + res += "Element"; + break; + case PART_LEVEL: + res += "Part"; + break; + case NET_LEVEL: + res += "Net"; + break; + default: + break; + } + return res; + } } |