1 4 package org.oddjob.webapp.model; 5 6 13 public class NodeInfo { 14 15 16 private final String nodeName; 17 18 19 private final String [] childRefIds; 20 21 22 private final String iconId; 23 24 31 public NodeInfo (String nodeName, 32 String [] childRefIds, 33 String iconId) { 34 if (childRefIds == null) { 35 throw new NullPointerException ("childRefId[] should be an empty array, not null."); 36 } 37 this.nodeName = nodeName; 38 this.childRefIds = childRefIds; 39 this.iconId = iconId; 40 } 41 42 47 public String [] getChildRefIds() { 48 return childRefIds; 49 } 50 51 56 public String getIconId() { 57 return iconId; 58 } 59 60 65 public String getNodeName() { 66 return nodeName; 67 } 68 69 74 public boolean getHasChildren() { 75 return !(childRefIds.length == 0); 76 } 77 } 78 | Popular Tags |