Java Boolean to Char convertBooleanToChar(final boolean value)

Here you can find the source of convertBooleanToChar(final boolean value)

Description

convert Boolean To Char

License

Open Source License

Parameter

Parameter Description
value Boolean value

Return

'X' if the value is true and space if value is false

Declaration

@Deprecated
public static char convertBooleanToChar(final boolean value) 

Method Source Code

//package com.java2s;
/*/* ww w .  j  a v  a 2s.  co m*/
 * [y] hybris Platform
 *
 * Copyright (c) 2000-2014 hybris AG
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of hybris
 * ("Confidential Information"). You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the
 * license agreement you entered into with hybris.
 *
 *
 */

public class Main {
    @Deprecated
    private static final char ABAP_FALSE = ' ';
    @Deprecated
    private static final char ABAP_TRUE = 'X';

    /**
     * @param value
     *           Boolean value
     * @return 'X' if the value is true and space if value is false
     */
    @Deprecated
    public static char convertBooleanToChar(final boolean value) {

        if (value) {
            return ABAP_TRUE;
        } else {
            return ABAP_FALSE;
        }

    }
}

Related

  1. booleanToChar(boolean[] values)
  2. booleanTochar(final boolean value)