c56b587e82888f48b55f2ff0fd7cea0e1c904617
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ctf.core / src / org / eclipse / tracecompass / tmf / ctf / core / CtfEnumPair.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2014 Ericsson
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
13 package org.eclipse.tracecompass.tmf.ctf.core;
14
15 import org.eclipse.tracecompass.tmf.core.util.Pair;
16
17 /**
18 * Pair of Enum value name and its long value.
19 *
20 * @author Bernd Hufmann
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
54 @Override
55 public String toString() {
56 return getFirst();
57 }
58 }
This page took 0.041506 seconds and 4 git commands to generate.