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

org.cpp4j.java.RefInt Maven / Gradle / Ivy

The newest version!
/*************************************************************************
 *                                                                       *
 * Open Dynamics Engine 4J, Copyright (C) 2007-2013 Tilmann Zaeschke     *
 * All rights reserved.  Email: [email protected]   Web: www.ode4j.org        *
 *                                                                       *
 * This library is free software; you can redistribute it and/or         *
 * modify it under the terms of EITHER:                                  *
 *   (1) The GNU Lesser General Public License as published by the Free  *
 *       Software Foundation; either version 2.1 of the License, or (at  *
 *       your option) any later version. The text of the GNU Lesser      *
 *       General Public License is included with this library in the     *
 *       file LICENSE.TXT.                                               *
 *   (2) The BSD-style license that is included with this library in     *
 *       the file ODE4J-LICENSE-BSD.TXT.                                 *
 *                                                                       *
 * This library is distributed in the hope that it will be useful,       *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
 * LICENSE.TXT and ODE4J-LICENSE-BSD.TXT for more details.               *
 *                                                                       *
 *************************************************************************/
package org.cpp4j.java;

public final class RefInt {
	public int i = 0;

	public RefInt() {
		// Nothing
	}

	public RefInt(int v) {
		i = v;
	}

	public final void set(int v) {
		i = v;
	}

	public final int get() {
		return i;
	}

	public final void inc() {
		i++;
	}

	public void add(int j) {
		i += j;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy