emotionhero/app/src/main/java/com/rubenvandeven/emotionhero/AchievementCollection.java

39 lines
1.1 KiB
Java

package com.rubenvandeven.emotionhero;
import android.support.v4.content.res.TypedArrayUtils;
import java.util.ArrayList;
/**
* Created by ruben on 10/09/16.
*/
public class AchievementCollection {
private ArrayList<Achievement> achievements = new ArrayList<Achievement>(){{
// fill the collection :-)
add(new Achievement("Microexpressor", null, null));
add(new Achievement("\"In pursuit of happiness\"", null, null));
add(new Achievement("CEO", null, null));
add(new Achievement("Kuleshov", null, null));
add(new Achievement("Soap opera", null, null));
add(new Achievement("Stock photo model", null, null));
}};
private static AchievementCollection ourInstance = new AchievementCollection();
public static AchievementCollection getInstance() {
return ourInstance;
}
private AchievementCollection() {
}
// ids start at one
public Achievement get(int id) {
return achievements.get(id-1);
}
public int getId(Achievement a){
return achievements.indexOf(a) + 1;
}
}