1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
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
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.statevalue
;
16 * A state value containing a simple integer.
19 * @author Alexandre Montplaisir
21 final class IntegerStateValue
extends TmfStateValue
{
23 private final int valueInt
;
25 public IntegerStateValue(int valueAsInt
) {
26 this.valueInt
= valueAsInt
;
30 public Type
getType() {
35 public boolean isNull() {
40 public Integer
getValue() {
45 public String
toString() {
46 return String
.format("%3d", valueInt
); //$NON-NLS-1$
49 // ------------------------------------------------------------------------
51 // ------------------------------------------------------------------------
54 public int unboxInt() {
59 public long unboxLong() {
60 /* It's always safe to up-cast a int into a long */
This page took 0.039826 seconds and 6 git commands to generate.