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
.statesystem
.core
.statevalue
;
15 import org
.eclipse
.jdt
.annotation
.Nullable
;
18 * A state value that contains no particular value. It is sometimes needed over
19 * a "null" reference, since we avoid NPE's this way.
21 * It can also be read either as a String ("nullValue") or an Integer (-1).
24 * @author Alexandre Montplaisir
26 final class NullStateValue
extends TmfStateValue
{
28 private final String value
= "nullValue"; //$NON-NLS-1$
31 public Type
getType() {
36 public boolean isNull() {
41 public boolean equals(@Nullable Object object
) {
42 return (object
instanceof NullStateValue
);
46 public int hashCode() {
51 public String
toString() {
55 // ------------------------------------------------------------------------
56 // Unboxing methods. Null values can be unboxed into any type.
57 // ------------------------------------------------------------------------
60 public int unboxInt() {
65 public long unboxLong() {
70 public double unboxDouble() {
75 public String
unboxStr() {
This page took 0.032649 seconds and 5 git commands to generate.