Back to project page reflect-app.
The source code is released under:
Apache License
If you think the Android project reflect-app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.pontydysgu.pontylearningapp; //from w w w . j a v a 2 s. c o m import com.pontydysgu.data.QuestionStack; import com.pontydysgu.data.StackArray; public class DataService { private static DataService singleton; public static final DataService getInstance() { if (singleton == null) { singleton = new DataService(); } return singleton; } private StackArray stackArray; public StackArray getStackArray() { return this.stackArray; } public void setStackArray(StackArray stackArray) { this.stackArray = stackArray; } public QuestionStack getQuestionStack(Long id) { if (this.stackArray == null) return null; for (QuestionStack stack : this.stackArray) { if (id.equals(stack.getId())) { return stack; } } return null; } }