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; }
public static boolean existGroup(Pads cfg, String groupName) { for (PadGroup g : cfg.getPadGroup()) { if (groupName.equals(g.getName())) return true; } return false; }
public static PadGroup getPadGroup(Pads cfg, String groupName) { for (PadGroup g : cfg.getPadGroup()) if (groupName.equals(g.getName())) return g; return null; }