Example #1
0
 /**
  * @param id of the interface
  * @return whether the interface with the given id is open
  */
 public boolean isParentInterfaceOpen(int id) {
   RSInterface[] cache = getAllParents();
   for (RSInterface loop : cache) {
     if (loop.getId() == id) {
       return true;
     }
   }
   return false;
 }
Example #2
0
  public boolean isInterfaceOpen(int id) {
    RSInterface[] cache = getAllParents();
    for (RSInterface loop : cache) {
      for (RSInterfaceChild loop2 : loop.getChildren()) {
        if (loop2 != null && loop2.getId() != -1 && loop2.getId() == id) {

          return true;
        }
      }
      if (loop != null && loop.getId() == id) {
        return true;
      }
    }
    return false;
  }