Android Open Source - Rejsekort-Reminder Activity Results

From Project

Back to project page Rejsekort-Reminder.


The source code is released under:

GNU General Public License

If you think the Android project Rejsekort-Reminder listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.publictransportation.modes;
/*w w w .ja v  a 2s .c  om*/
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class ActivityResults {
  private List<String> results;
  final int MAX_RESULTS;
  public ActivityResults(int max) {
    results = new ArrayList<String>();
    MAX_RESULTS = max;
  public void add(String result) {
    // limit to max size
    if (results.size() == MAX_RESULTS) {
  // results presented in reverse
  public List<String> getLatestResults() {
    // present results in LIFO order
    List<String> copy = new ArrayList<String>(results); 
    return copy;
  public int size() {
    return results.size();

Java Source Code List