Пример #1
0
  /** Return a list of BPM nodes associated with the list of bpmAgents */
  public static List<BPM> getNodes(final List<BpmAgent> bpmAgents) {
    final int count = bpmAgents.size();
    final List<BPM> bpmNodes = new ArrayList<>(count);

    for (int index = 0; index < count; index++) {
      final BpmAgent bpmAgent = bpmAgents.get(index);
      bpmNodes.add(bpmAgent.getNode());
    }
    return bpmNodes;
  }
Пример #2
0
 /**
  * Get the value associated with the specified key.
  *
  * @param key The key for which to get the associated value.
  * @return The value as an Object.
  */
 public Object valueForKey(final String key) {
   if (key.equals(CORRECTOR_KEY)) {
     return isCorrectorSupply();
   }
   if (key.equals(SINGLE_MAGNET_KEY)) {
     return _correctors.size() == 1;
   }
   if (key.equals(PLANE_KEY)) {
     return isHorizontal() ? "X" : "Y";
   } else {
     return null;
   }
 }