Commit | Line | Data |
---|---|---|
d4a8d935 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2012, 2014 Ericsson |
d4a8d935 BH |
3 | * |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Bernd Hufmann - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.ctf.core; |
d4a8d935 | 14 | |
2bdf0193 | 15 | import org.eclipse.tracecompass.tmf.core.util.Pair; |
d4a8d935 BH |
16 | |
17 | /** | |
18 | * Pair of Enum value name and its long value. | |
19 | * | |
20 | * @author Bernd Hufmann | |
d4a8d935 BH |
21 | */ |
22 | public class CtfEnumPair extends Pair<String, Long> { | |
23 | ||
24 | /** | |
25 | * Constructs a CtfEnumPair | |
26 | * | |
27 | * @param strValue | |
28 | * The first parameter of the pair (String) | |
29 | * @param longValue | |
30 | * The second parameter of the pair (Long) | |
31 | */ | |
32 | public CtfEnumPair(String strValue, Long longValue) { | |
33 | super(strValue, longValue); | |
34 | } | |
35 | ||
36 | /** | |
37 | * Returns the String value of the Enum. | |
38 | * | |
39 | * @return the string value | |
40 | */ | |
41 | public String getStringValue() { | |
42 | return getFirst(); | |
43 | } | |
44 | ||
45 | /** | |
46 | * Returns the long value of the Enum. | |
47 | * | |
48 | * @return the Long value | |
49 | */ | |
50 | public Long getLongValue() { | |
51 | return getSecond(); | |
52 | } | |
53 | ||
d4a8d935 BH |
54 | @Override |
55 | public String toString() { | |
56 | return getFirst(); | |
57 | } | |
58 | } |