1 /*******************************************************************************
2 * Copyright (c) 2010 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.databoard.primitives;
14 public class MutableByte extends Number implements Comparable<MutableByte> {
16 private static final long serialVersionUID = 1L;
20 public MutableByte() {}
22 public MutableByte(byte value) { this.value = value; }
25 public double doubleValue() {
30 public float floatValue() {
35 public int intValue() {
40 public long longValue() {
44 public String toString() {
45 return String.valueOf((int) value);
48 public int hashCode() {
52 public boolean equals(Object obj) {
53 if (obj == null) return false;
54 if (obj == this) return true;
56 if (obj instanceof MutableByte) {
57 return value == ((MutableByte) obj).byteValue();
62 public int compareTo(MutableByte anotherByte) {
63 return this.value - anotherByte.value;