code: @SuppressWarnings("unchecked")
      public <KP extends Object> KP getKeyPart(final Class<KP> keyPartClass) {
          return (KP) getListKeyPart().stream()
                                      .filter(kp -> kp != null && keyPartClass.isAssignableFrom(kp.getClass()))
                                      .findFirst()
                                      .get();
      }
docs: Return the first object assignable from te given class.
  
  @param keyPartClass the class used to search the first instance
  
  @return the first instance found or raise a NoSuchElementException