title: get some of the items in an array
body: <p>I have an array that contains integers and i want to filter this array based on the value like i want to get only items that is bigger than the last item by 30 or whatever </p>
  
  <p>That's want i mean i have an array like this <code>[0,10,25,30,55,60,65,75,82....]</code>
  and i want to filter this to have the first number and see if the next number is bigger by 30 if not jump on the next one and check</p>
  
  <p>That what i have tried but i don't think its any closer to what i want</p>
  
  <pre><code>for(int i=0; i&lt;array.size(); i++){
      if(array.get(i)&lt;array.get(i+1)+30){
          //do something with that number
      }
  }
  </code></pre>