title: Java Pattern Matching of Tuples
body: <p>I have a vector where each object is a tuple containing of types  for ex: &lt;-1,2,3,45.67>. Now i had large set of these tuples, how can i find all the patterns in these tuples, i dont know their start and end points and how many such patterns. <br/>Need to find all different patterns and how many times they occur?</p>
  
  <p>EX:<br/></p>
  
  <blockquote>
    <p><strong>&lt;1,2,2,68.8752808539275>&lt;-1,1,2,68.8752808539275>&lt;-1,-2,2,112.60225083387081></strong>&lt;-2,0,2,158.8752808539275><strong>&lt;1,2,2,68.8752808539275>&lt;-1,1,2,68.8752808539275>&lt;-1,-2,2,112.60225083387081></strong></p>
  </blockquote>
  
  <p>Now I need match first three tuples with last tuples as they are identical.<br/>How can I do it in Java?</p>
  
  <p>My input is just a vector of objects, where each object is has the above fields of a class, and i dont give search pattern, it should recognize all different patterns in the vector..</p>