All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.core.immutable.ImmutableIntWrapper Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.core.immutable;

/**
 * Base class for integer wrapper classes.
 * 

* Same as {@link ImmutableStringWrapper} for integers. * * @author Oliver Richers */ public class ImmutableIntWrapper implements Comparable { private final int value; protected ImmutableIntWrapper(int value) { this.value = value; } public int toInt() { return value; } @Override public String toString() { return "" + value; } @Override public int hashCode() { return value; } @Override public boolean equals(Object other) { if (other instanceof ImmutableIntWrapper) { return value == ((ImmutableIntWrapper) other).value; } return false; } @Override public int compareTo(ImmutableIntWrapper other) { return value - other.value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy