title: How to get data from a method which relies on other methods for its data?
body: <p>I have three methods. </p>
  
  <ol>
  <li><p>The first method takes data from a List (which contains data objects specific to our my application), it then calls the second method, passing in the data it has acquired as parameters. </p></li>
  <li><p>The second method then uses this information as a reference to take specific information from another list, calling the third method and passing this information to it as parameters. </p></li>
  <li><p>The third method does the same as the second, using the data that is passed in as a reference to find specific data in a list.</p></li>
  </ol>
  
  <p>Now the problem is, I want to use this information in a totally different method.</p>
  
  <p>How should I go about calling my methods in order to get out the data?</p>
  
  <pre><code>private void getRecords() {
      List&lt;LabelSet&gt; allSets = labelSetStructureService.getLabelSets();
      for (LabelSet labelSet : allSets) {
          List&lt;LabelSet&gt; groups = labelSetStructureService.getLabelGroupsForSet(labelSet.getId());
          for (LabelGroup group : groups) {
               getValuesForLabel(group.getCustomerMeasure(), labelSetStructureService.getLabelsForLabelGroup(group.getCustomer().getId(), group.getId()), labelSet);
          }
      }
  }
  
  private void getValuesForLabel(CustomerMeasure measure, List&lt;Label&gt; labels, LabelSet labelSet) {
      for (Label label : labels) {
          List&lt;LabelSet&gt; usageRecs = labelDataService.getLabelData(label, LabelSetStorage.DAY_BY_MONTH_STORAGE, new DateTime(), new DateTime().minusWeeks(1));
          preProcessUsageRecs( usageRecs, labelSet);
      }
  }
  
  private List&lt;LabelUsage&gt; preProcessUsageRecs(List&lt;LabelUsage&gt; usageRecs, LabelSet labelSet) {
      //Format records, use list instead strings where possible
  
      List&lt;LabelSet&gt; usageRecords = usageRecs; {
        for( LabelUsage labelUsage : usageRecs)
            usageRecords.addAll(usageRecs);
      }
       return usageRecords;
      }
  </code></pre>