code: public <T extends MPBase> T getById(String id) throws MPException {
          T resource = null;
          for (int i = 0; i < _resourceArray.size(); i++) {
              resource = getByIndex(i);
              try {
                  Field field = resource.getClass().getDeclaredField("id");
                  field.setAccessible(true);
                  String resourceId = field.get(resource).toString();
                  if (resourceId.equals(id)) {
                      break;
                  }
              } catch (Exception exception) {
                  throw new MPException(exception);
              }
          }
          return resource;
      }
docs: It returns one resource of the array using the id
  
  @param id                a String with the id of the resource to be returned
  @param <T>
  @return
  @throws MPException