Here you can find the source of toPrimitiveInt(Integer value)
Parameter | Description |
---|---|
value | the <tt>Integer</tt> value |
public static int toPrimitiveInt(Integer value)
//package com.java2s; /**//from www.j a v a2 s . c o m * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. */ public class Main { /** * Converts an object Integer to a primitive int. * * @param value the <tt>Integer</tt> value * @return <tt>0</tt> if the given Integer value is null else <tt>integer value</tt> */ public static int toPrimitiveInt(Integer value) { if (value == null) { return 0; } return value; } }