Esempio n. 1
0
  public Entity getByServerId(long l) {
    for (Iterator iterator = getAll().iterator(); iterator.hasNext(); ) {
      Entity entity = (Entity) iterator.next();
      if (entity.getServerId() == l) {
        return entity;
      }
    }

    return null;
  }
Esempio n. 2
0
  public Entity getByUUID(UUID uuid) {
    for (Iterator iterator = getAll().iterator(); iterator.hasNext(); ) {
      Entity entity = (Entity) iterator.next();
      if (entity.getUuid() != null && uuid != null && entity.getUuid().equals(uuid)) {
        return entity;
      }
    }

    return null;
  }
Esempio n. 3
0
  public transient Entity a(long l, com.fitbit.data.domain.Entity.EntityStatus aentitystatus[]) {
    for (Iterator iterator = getAll().iterator(); iterator.hasNext(); ) {
      Entity entity = (Entity) iterator.next();
      int j = aentitystatus.length;
      int i = 0;
      boolean flag = false;
      while (i < j) {
        com.fitbit.data.domain.Entity.EntityStatus entitystatus = aentitystatus[i];
        boolean flag1;
        if (entity.getEntityStatus() == entitystatus) {
          flag1 = true;
        } else {
          flag1 = false;
        }
        flag |= flag1;
        i++;
      }
      if (entity.getServerId() == l && !flag) {
        return entity;
      }
    }

    return null;
  }