Here you can find the source of fromHex(String hex)
Parameter | Description |
---|---|
hex | the hex value to be parsed into an integer |
public static final int fromHex(String hex)
//package com.java2s; /**// ww w. jav a 2 s .c o m * Copyright (c) 2010-2016, openHAB.org and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ public class Main { /** * Returns the integer value of an hexadecimal number (base 16). * * @param hex * the hex value to be parsed into an integer * @return the given hex value as integer */ public static final int fromHex(String hex) { return Integer.parseInt(hex, 16); } }