Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* *********************************************************************
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0.
  * 
  * If a copy of the MPL was not distributed with this file, You can obtain
  * one at http://mozilla.org/MPL/2.0/.
  * 
  * This Source Code Form is "Incompatible With Secondary Licenses", as
  * defined by the Mozilla Public License, v. 2.0.
 * ********************************************************************* */
package fiftyone.mobile.detection;

Mutable wrapper class for ints to allow pass by reference.

Author(s):
51Degrees.mobi
Version:
2.2.8.9
public class Num {

    
Holds the it value being wrapped.
    private int _i;

    
Default constructor, sets value to 0.
    public Num() {
         = 0;
    }

    
Constructs object and assigns x as the value.

Parameters:
x value to set object to.
    public Num(int x) {
         = x;
    }

    

Returns:
the int value stored in the wrapper.
    public int get() {
        return ;
    }

    
Sets the int value stored in the wrapper.

Parameters:
x the value to set the wrapper to.
    public void set(int x) {
         = x;
    }
New to GrepCode? Check out our FAQ X