Here you can find the source of isOdd(BigInteger in)
Parameter | Description |
---|---|
in | The BigInteger to test |
public static final boolean isOdd(BigInteger in)
//package com.java2s; /*/*from w w w . j ava2 s. c om*/ * This file is part of an unofficial ISO20008-2.2 sample implementation to * evaluate certain schemes for their applicability on Android-based mobile * devices. The source is licensed under the modified 3-clause BSD license, * see the readme. * * The code was published in conjunction with the publication called * "Group Signatures on Mobile Devices: Practical Experiences" by * Potzmader, Winter, Hein, Hanser, Teufl and Chen */ import java.math.BigInteger; public class Main { /** * Tests whether a given {@link BigInteger} is odd. Convience-wrapper * for {@link BigInteger#testBit(int)}. * * @param in The {@link BigInteger} to test * @return true if odd, false otherwise */ public static final boolean isOdd(BigInteger in) { return in.testBit(0); } }