RuneHive-Game
Loading...
Searching...
No Matches
ActivityType.java
Go to the documentation of this file.
1package com.runehive.content.activity;
2
3
4import java.util.LinkedList;
5import java.util.List;
6
7/**
8 * Holds all activity types that are timed.
9 *
10 * @author Daniel
11 */
12public enum ActivityType {
15 INFERNO(true),
17 BARROWS(true),
18 ZULRAH(true),
19 KRAKEN(true),
20 DUEL_ARENA(false),
21 TUTORIAL(false),
23 VORKATH(true),
24 JAIL(false),
26 CERBERUS(true),
27 GODWARS(false),
29
30 final boolean record;
31 private static final List<ActivityType> RECORDABLE = new LinkedList<>();
32
33 static {
34 for (ActivityType activity : values()) {
35 if (activity.record)
37 }
38 }
39
41 this.record = record;
42 }
43
44 public static List<ActivityType> getRecordable() {
45 return new LinkedList<>(RECORDABLE);
46 }
47
48 public static ActivityType getOrdinal(int ordinal) {
49 if (ordinal < 0 || ordinal > RECORDABLE.size())
50 return null;
51 return RECORDABLE.get(ordinal);
52 }
53
54 public static ActivityType getFirst() {
55 return getOrdinal(0);
56 }
57}
static final List< ActivityType > RECORDABLE
static ActivityType getOrdinal(int ordinal)
static List< ActivityType > getRecordable()