Beispiel #1
0
  public Pads clone(Pads pads) {

    if (pads == null) return null;

    Pads newPads = new Pads();

    if (pads.getInstanceName() != null) newPads.setInstanceName(pads.getInstanceName());

    for (PadGroup pg : pads.getPadGroup()) newPads.getPadGroup().add(clone(pg));

    for (Pad p : pads.getPad()) newPads.getPad().add(clone(p));

    return newPads;
  }
Beispiel #2
0
 public static boolean existGroup(Pads cfg, String groupName) {
   for (PadGroup g : cfg.getPadGroup()) {
     if (groupName.equals(g.getName())) return true;
   }
   return false;
 }
Beispiel #3
0
  public static PadGroup getPadGroup(Pads cfg, String groupName) {

    for (PadGroup g : cfg.getPadGroup()) if (groupName.equals(g.getName())) return g;

    return null;
  }