Java Abs abs(int x)

Here you can find the source of abs(int x)

Description

abs

License

Apache License

Declaration

private static int abs(int x) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * In the Hi-WAY project we propose a novel approach of executing scientific
 * workflows processing Big Data, as found in NGS applications, on distributed
 * computational infrastructures. The Hi-WAY software stack comprises the func-
 * tional workflow language Cuneiform as well as the Hi-WAY ApplicationMaster
 * for Apache Hadoop 2.x (YARN).//www .j  av a2  s  . co m
 *
 * List of Contributors:
 *
 * J?rgen Brandt (HU Berlin)
 * Marc Bux (HU Berlin)
 * Ulf Leser (HU Berlin)
 *
 * J?rgen Brandt is funded by the European Commission through the BiobankCloud
 * project. Marc Bux is funded by the Deutsche Forschungsgemeinschaft through
 * research training group SOAMED (GRK 1651).
 *
 * Copyright 2014 Humboldt-Universit?t zu Berlin
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/

public class Main {
    private static int abs(int x) {

        if (x < 0)
            return -x;

        return x;
    }
}

Related

  1. abs(int number)
  2. abs(int pos, double[] array)
  3. abs(int val)
  4. abs(int val)
  5. abs(int value)
  6. abs(long index)
  7. Abs(Object in)
  8. abs(short x)
  9. abs2(double[][] IN)