Add target platforms for Eclipse 3.8, 4.2, 4.3 and staging (4.4)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / statevalue / IntegerStateValue.java
CommitLineData
a52fde77 1/*******************************************************************************
11252342 2 * Copyright (c) 2012, 2013 Ericsson
a52fde77
AM
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
2cb26548 5 *
a52fde77
AM
6 * All rights reserved. This program and the accompanying materials are
7 * made available under the terms of the Eclipse Public License v1.0 which
8 * accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
2cb26548 10 *
a52fde77
AM
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.tmf.core.statevalue;
14
15/**
16 * A state value containing a simple integer.
a52fde77 17 *
2cb26548
AM
18 * @version 1.0
19 * @author Alexandre Montplaisir
a52fde77
AM
20 */
21final class IntegerStateValue extends TmfStateValue {
22
fa6b1ab8 23 private final int valueInt;
a52fde77
AM
24
25 public IntegerStateValue(int valueAsInt) {
fa6b1ab8 26 this.valueInt = valueAsInt;
a52fde77
AM
27 }
28
29 @Override
b67a2540
AM
30 public Type getType() {
31 return Type.INTEGER;
a52fde77
AM
32 }
33
34 @Override
35 public boolean isNull() {
36 return false;
37 }
38
39 @Override
40 public Integer getValue() {
41 return valueInt;
42 }
43
a52fde77 44 @Override
fa6b1ab8 45 public String toString() {
a52fde77
AM
46 return String.format("%3d", valueInt); //$NON-NLS-1$
47 }
48}
This page took 0.038973 seconds and 5 git commands to generate.