Exemple #1
0
  public Pad clone(Pad p) {

    if (p == null) return null;

    Pad newPad = new Pad();

    if (p.getCount() != null) newPad.setCount(p.getCount());
    if (p.getCapacitance() != null) newPad.setCapacitance(p.getCapacitance());
    if (p.getGroup() != null) newPad.setGroup(p.getGroup());
    if (p.getModel() != null) newPad.setModel(p.getModel());
    if (p.getInstanceName() != null) newPad.setInstanceName(p.getInstanceName());
    if (p.getType() != null) newPad.setType(p.getType());

    return newPad;
  }
Exemple #2
0
  public static Pad getPad(Pads cfg, String groupName, String instName) {
    if (cfg == null) return null;

    for (Pad g : cfg.getPad())
      if ((groupName == null && g.getGroup() == null
              || groupName != null && groupName.equals(g.getGroup()))
          && (instName.equals(g.getInstanceName()))) return g;

    return null;
  }