code: public static List<Message> extractMessagesFrom(Collection<Forwarded> forwardedCollection) {
          List<Message> res = new ArrayList<>(forwardedCollection.size());
          for (Forwarded forwarded : forwardedCollection) {
              Message message =  (Message) forwarded.forwardedPacket;
              res.add(message);
          }
          return res;
      }
docs: Extract messages in a collection of forwarded elements. Note that it is required that the {@link Forwarded} in
  the given collection only contain {@link Message} stanzas.
  
  @param forwardedCollection the collection to extract from.
  @return a list a the extracted messages.
  @since 4.3.0