title: I am struggling with Generics in Java Stream
body: <p>I know how to utilize intermediate and terminal function with streams, and many other basic things. 
  but the task I have been given is confusing for me to implement. I have been struggling for last 36 hours non-stop.
  my assignment is as follow:</p>
  
  <blockquote>
    <p>Implement one static method in a functional way, that takes a <code>List&lt;T&gt;</code>, filters it, orders it, returns only a certain amount of values and skips a certain amount of values and applies a mapping function to it. The returnvalue shall be a <code>List&lt;R&gt;</code>. T and R are unspecified generic types. All needed values shall be parameters. The limit and offset shall be optional.
    Test your method using JUnit.</p>
  </blockquote>
  
  <p>so far I could only manage to write the code and I am stuck with first step filter. confusion is, if I don't know type of list how can I filter it.</p>
  
  <pre><code>public class GeneralMethods&lt;T,R&gt; {
  
      private List&lt;T&gt; recList;
      private List&lt;R&gt; retList;
  
      public void manipulateList(){
          retList = recList.stream().filter(s -&gt; s.)
      }
  }
  </code></pre>
  
  <p>This is my assignment I have struggled alot, I would appreciate your help.</p>