Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8986299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:30:59+00:00 2026-06-15T21:30:59+00:00

I have three methods. The first method takes data from a List (which contains

  • 0

I have three methods.

  1. 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.

  2. 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.

  3. 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.

Now the problem is, I want to use this information in a totally different method.

How should I go about calling my methods in order to get out the data?

private void getRecords() {
    List<LabelSet> allSets = labelSetStructureService.getLabelSets();
    for (LabelSet labelSet : allSets) {
        List<LabelSet> 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<Label> labels, LabelSet labelSet) {
    for (Label label : labels) {
        List<LabelSet> usageRecs = labelDataService.getLabelData(label, LabelSetStorage.DAY_BY_MONTH_STORAGE, new DateTime(), new DateTime().minusWeeks(1));
        preProcessUsageRecs( usageRecs, labelSet);
    }
}

private List<LabelUsage> preProcessUsageRecs(List<LabelUsage> usageRecs, LabelSet labelSet) {
    //Format records, use list instead strings where possible

    List<LabelSet> usageRecords = usageRecs; {
      for( LabelUsage labelUsage : usageRecs)
          usageRecords.addAll(usageRecs);
    }
     return usageRecords;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:31:00+00:00Added an answer on June 15, 2026 at 9:31 pm

    Java is an object based language, so use a member variable to store the result of that one call, like such that:

    public List<LabelUsage> labels;
    ...
    private List<LabelUsage> preProcessUsageRecs(List<LabelUsage> usageRecs, LabelSet labelSet) {
        //Format records, use list instead strings where possible
    
        List<LabelSet> usageRecords = usageRecs; {
          for( LabelUsage labelUsage : usageRecs)
              usageRecords.addAll(usageRecs);
        }
        this.labels = usageRecords;
         return usageRecords;
    }
    

    and then access this.labels wherever you would need to use the result of this method;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application which takes data from a file and stores it for
I have an application that takes a dictionary of files (file type, and list
Let us suppose i have these three methods defined: int F1(int, int); int F1(float,
My question is related to exception handling. If i have for example three methods
I have a convenience class for encoding URI's. In it I've created three methods
Lets say I have a test class called ServiceTest with three test methods test1,
I have a class called Path for which there are defined about 10 methods,
Trying to use GridBagLayout. I have the method called buildLabel. This creates three label.
Is there any method like the array_unique for objects? I have a bunch of
Outline My simple application takes text from a text box and calls an asp.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.