Java Boolean to String boolToStr(Boolean value)

Here you can find the source of boolToStr(Boolean value)

Description

bool To Str

License

Open Source License

Declaration

public static String boolToStr(Boolean value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public final static String YES = "Y";
    public final static String NO = "N";

    public static String boolToStr(Boolean value) {

        //How this reads is is the boolean true and is it equal to value? 

        if (Boolean.TRUE.equals(value)) {
            return YES;
        }//from  w w w. j  ava 2  s.c o  m
        return NO;
    }
}

Related

  1. booleanToString(boolean value)
  2. booleanToString(boolean[] values)
  3. booleanToString(String boolVal)
  4. booleanToString1(boolean bool)
  5. booleanToString_1(String str)
  6. boolToString(boolean x)
  7. boolToString(final boolean b)
  8. BoolToStringEx(Boolean bValue)
  9. convertBooleanToString(boolean flag)