100101102103104105106107108
Long id; try { id = Long.parseLong(key); } catch (NumberFormatException e) { throw new NoSuchResourceNodeException(this, key); } return nationToResourceNode.get(id); }
231232233234235236237238
if (key.equals(PRODUCER_RESOURCE_NODE)) { return producerResourceNode; } else if (key.equals(CONSUMER_RESOURCE_NODE)) { return consumerResourceNode; } else { throw new NoSuchResourceNodeException(this, key); } }
131132133134135136137138
*/ public ResourceNode getResourceNode(String key) { if (key.equals(RESOURCE_NODE_KEY)) { return resourceNode; } else { throw new NoSuchResourceNodeException(this, key); } }