Java Doc for BooleanUtils.java in  » Library » Apache-common-lang » org » apache » commons » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache common lang » org.apache.commons.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.lang.BooleanUtils

BooleanUtils
public class BooleanUtils (Code)

Operations on boolean primitives and Boolean objects.

This class tries to handle null input gracefully. An exception will not be thrown for a null input. Each method documents its behaviour in more detail.


author:
   Stephen Colebourne
author:
   Matthew Hawthorne
author:
   Gary Gregory
since:
   2.0
version:
   $Id: BooleanUtils.java 492378 2007-01-04 01:31:24Z scolebourne $



Constructor Summary
public  BooleanUtils()
    

BooleanUtils instances should NOT be constructed in standard programming.


Method Summary
public static  booleanisFalse(Boolean bool)
    
public static  booleanisNotFalse(Boolean bool)
    
public static  booleanisNotTrue(Boolean bool)
    
public static  booleanisTrue(Boolean bool)
    
public static  Booleannegate(Boolean bool)
    
public static  booleantoBoolean(Boolean bool)
    
public static  booleantoBoolean(int value)
    
public static  booleantoBoolean(int value, int trueValue, int falseValue)
    
public static  booleantoBoolean(Integer value, Integer trueValue, Integer falseValue)
    
public static  booleantoBoolean(String str)
    

Converts a String to a boolean (optimised for performance).

'true', 'on' or 'yes' (case insensitive) will return true.

public static  booleantoBoolean(String str, String trueString, String falseString)
    
public static  booleantoBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
    
public static  BooleantoBooleanObject(boolean bool)
    
public static  BooleantoBooleanObject(int value)
    
public static  BooleantoBooleanObject(Integer value)
    
public static  BooleantoBooleanObject(int value, int trueValue, int falseValue, int nullValue)
    
public static  BooleantoBooleanObject(Integer value, Integer trueValue, Integer falseValue, Integer nullValue)
    
public static  BooleantoBooleanObject(String str)
    

Converts a String to a Boolean.

'true', 'on' or 'yes' (case insensitive) will return true.

public static  BooleantoBooleanObject(String str, String trueString, String falseString, String nullString)
    
public static  inttoInteger(boolean bool)
    
public static  inttoInteger(boolean bool, int trueValue, int falseValue)
    
public static  inttoInteger(Boolean bool, int trueValue, int falseValue, int nullValue)
    
public static  IntegertoIntegerObject(boolean bool)
    
public static  IntegertoIntegerObject(Boolean bool)
    
public static  IntegertoIntegerObject(boolean bool, Integer trueValue, Integer falseValue)
    
public static  IntegertoIntegerObject(Boolean bool, Integer trueValue, Integer falseValue, Integer nullValue)
    
public static  StringtoString(Boolean bool, String trueString, String falseString, String nullString)
    
public static  StringtoString(boolean bool, String trueString, String falseString)
    
public static  StringtoStringOnOff(Boolean bool)
    
public static  StringtoStringOnOff(boolean bool)
    
public static  StringtoStringTrueFalse(Boolean bool)
    
public static  StringtoStringTrueFalse(boolean bool)
    
public static  StringtoStringYesNo(Boolean bool)
    
public static  StringtoStringYesNo(boolean bool)
    
public static  booleanxor(boolean[] array)
    
public static  Booleanxor(Boolean[] array)
    


Constructor Detail
BooleanUtils
public BooleanUtils()(Code)

BooleanUtils instances should NOT be constructed in standard programming. Instead, the class should be used as BooleanUtils.toBooleanObject(true);.

This constructor is public to permit tools that require a JavaBean instance to operate.





Method Detail
isFalse
public static boolean isFalse(Boolean bool)(Code)

Checks if a Boolean value is false, handling null by returning false.

 BooleanUtils.isFalse(Boolean.TRUE)  = false
 BooleanUtils.isFalse(Boolean.FALSE) = true
 BooleanUtils.isFalse(null)          = false
 

Parameters:
  bool - the boolean to check, null returns false true only if the input is non-null and false
since:
   2.1



isNotFalse
public static boolean isNotFalse(Boolean bool)(Code)

Checks if a Boolean value is not false, handling null by returning true.

 BooleanUtils.isNotFalse(Boolean.TRUE)  = true
 BooleanUtils.isNotFalse(Boolean.FALSE) = false
 BooleanUtils.isNotFalse(null)          = true
 

Parameters:
  bool - the boolean to check, null returns true true if the input is null or true
since:
   2.3



isNotTrue
public static boolean isNotTrue(Boolean bool)(Code)

Checks if a Boolean value is not true, handling null by returning true.

 BooleanUtils.isNotTrue(Boolean.TRUE)  = false
 BooleanUtils.isNotTrue(Boolean.FALSE) = true
 BooleanUtils.isNotTrue(null)          = true
 

Parameters:
  bool - the boolean to check, null returns true true if the input is null or false
since:
   2.3



isTrue
public static boolean isTrue(Boolean bool)(Code)

Checks if a Boolean value is true, handling null by returning false.

 BooleanUtils.isTrue(Boolean.TRUE)  = true
 BooleanUtils.isTrue(Boolean.FALSE) = false
 BooleanUtils.isTrue(null)          = false
 

Parameters:
  bool - the boolean to check, null returns false true only if the input is non-null and true
since:
   2.1



negate
public static Boolean negate(Boolean bool)(Code)

Negates the specified boolean.

If null is passed in, null will be returned.

 BooleanUtils.negate(Boolean.TRUE)  = Boolean.FALSE;
 BooleanUtils.negate(Boolean.FALSE) = Boolean.TRUE;
 BooleanUtils.negate(null)          = null;
 

Parameters:
  bool - the Boolean to negate, may be null the negated Boolean, or null if null input



toBoolean
public static boolean toBoolean(Boolean bool)(Code)

Converts a Boolean to a boolean handling null by returning false.

 BooleanUtils.toBoolean(Boolean.TRUE)  = true
 BooleanUtils.toBoolean(Boolean.FALSE) = false
 BooleanUtils.toBoolean(null)          = false
 

Parameters:
  bool - the boolean to convert true or false, null returns false



toBoolean
public static boolean toBoolean(int value)(Code)

Converts an int to a boolean using the convention that zero is false.

 BooleanUtils.toBoolean(0) = false
 BooleanUtils.toBoolean(1) = true
 BooleanUtils.toBoolean(2) = true
 

Parameters:
  value - the int to convert true if non-zero, falseif zero



toBoolean
public static boolean toBoolean(int value, int trueValue, int falseValue)(Code)

Converts an int to a boolean specifying the conversion values.

 BooleanUtils.toBoolean(0, 1, 0) = false
 BooleanUtils.toBoolean(1, 1, 0) = true
 BooleanUtils.toBoolean(2, 1, 2) = false
 BooleanUtils.toBoolean(2, 2, 0) = true
 

Parameters:
  value - the Integer to convert
Parameters:
  trueValue - the value to match for true
Parameters:
  falseValue - the value to match for false true or false
throws:
  IllegalArgumentException - if no match



toBoolean
public static boolean toBoolean(Integer value, Integer trueValue, Integer falseValue)(Code)

Converts an Integer to a boolean specifying the conversion values.

 BooleanUtils.toBoolean(new Integer(0), new Integer(1), new Integer(0)) = false
 BooleanUtils.toBoolean(new Integer(1), new Integer(1), new Integer(0)) = true
 BooleanUtils.toBoolean(new Integer(2), new Integer(1), new Integer(2)) = false
 BooleanUtils.toBoolean(new Integer(2), new Integer(2), new Integer(0)) = true
 BooleanUtils.toBoolean(null, null, new Integer(0))                     = true
 

Parameters:
  value - the Integer to convert
Parameters:
  trueValue - the value to match for true,may be null
Parameters:
  falseValue - the value to match for false,may be null true or false
throws:
  IllegalArgumentException - if no match



toBoolean
public static boolean toBoolean(String str)(Code)

Converts a String to a boolean (optimised for performance).

'true', 'on' or 'yes' (case insensitive) will return true. Otherwise, false is returned.

This method performs 4 times faster (JDK1.4) than Boolean.valueOf(String). However, this method accepts 'on' and 'yes' as true values.

 BooleanUtils.toBoolean(null)    = false
 BooleanUtils.toBoolean("true")  = true
 BooleanUtils.toBoolean("TRUE")  = true
 BooleanUtils.toBoolean("tRUe")  = true
 BooleanUtils.toBoolean("on")    = true
 BooleanUtils.toBoolean("yes")   = true
 BooleanUtils.toBoolean("false") = false
 BooleanUtils.toBoolean("x gti") = false
 

Parameters:
  str - the String to check the boolean value of the string, false if no match



toBoolean
public static boolean toBoolean(String str, String trueString, String falseString)(Code)

Converts a String to a Boolean throwing an exception if no match found.

null is returned if there is no match.

 BooleanUtils.toBoolean("true", "true", "false")  = true
 BooleanUtils.toBoolean("false", "true", "false") = false
 

Parameters:
  str - the String to check
Parameters:
  trueString - the String to match for true(case sensitive), may be null
Parameters:
  falseString - the String to match for false(case sensitive), may be null the boolean value of the string
throws:
  IllegalArgumentException - if the String doesn't match



toBooleanDefaultIfNull
public static boolean toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)(Code)

Converts a Boolean to a boolean handling null.

 BooleanUtils.toBooleanDefaultIfNull(Boolean.TRUE, false) = true
 BooleanUtils.toBooleanDefaultIfNull(Boolean.FALSE, true) = false
 BooleanUtils.toBooleanDefaultIfNull(null, true)          = true
 

Parameters:
  bool - the boolean to convert
Parameters:
  valueIfNull - the boolean value to return if null true or false



toBooleanObject
public static Boolean toBooleanObject(boolean bool)(Code)

Boolean factory that avoids creating new Boolean objecs all the time.

This method was added to JDK1.4 but is available here for earlier JDKs.

 BooleanUtils.toBooleanObject(false) = Boolean.FALSE
 BooleanUtils.toBooleanObject(true)  = Boolean.TRUE
 

Parameters:
  bool - the boolean to convert Boolean.TRUE or Boolean.FALSE as appropriate



toBooleanObject
public static Boolean toBooleanObject(int value)(Code)

Converts an int to a Boolean using the convention that zero is false.

 BooleanUtils.toBoolean(0) = Boolean.FALSE
 BooleanUtils.toBoolean(1) = Boolean.TRUE
 BooleanUtils.toBoolean(2) = Boolean.TRUE
 

Parameters:
  value - the int to convert Boolean.TRUE if non-zero, Boolean.FALSE if zero,null if null



toBooleanObject
public static Boolean toBooleanObject(Integer value)(Code)

Converts an Integer to a Boolean using the convention that zero is false.

null will be converted to null.

 BooleanUtils.toBoolean(new Integer(0))    = Boolean.FALSE
 BooleanUtils.toBoolean(new Integer(1))    = Boolean.TRUE
 BooleanUtils.toBoolean(new Integer(null)) = null
 

Parameters:
  value - the Integer to convert Boolean.TRUE if non-zero, Boolean.FALSE if zero,null if null input



toBooleanObject
public static Boolean toBooleanObject(int value, int trueValue, int falseValue, int nullValue)(Code)

Converts an int to a Boolean specifying the conversion values.

 BooleanUtils.toBooleanObject(0, 0, 2, 3) = Boolean.TRUE
 BooleanUtils.toBooleanObject(2, 1, 2, 3) = Boolean.FALSE
 BooleanUtils.toBooleanObject(3, 1, 2, 3) = null
 

Parameters:
  value - the Integer to convert
Parameters:
  trueValue - the value to match for true
Parameters:
  falseValue - the value to match for false
Parameters:
  nullValue - the value to to match for null Boolean.TRUE, Boolean.FALSE, or null
throws:
  IllegalArgumentException - if no match



toBooleanObject
public static Boolean toBooleanObject(Integer value, Integer trueValue, Integer falseValue, Integer nullValue)(Code)

Converts an Integer to a Boolean specifying the conversion values.

 BooleanUtils.toBooleanObject(new Integer(0), new Integer(0), new Integer(2), new Integer(3)) = Boolean.TRUE
 BooleanUtils.toBooleanObject(new Integer(2), new Integer(1), new Integer(2), new Integer(3)) = Boolean.FALSE
 BooleanUtils.toBooleanObject(new Integer(3), new Integer(1), new Integer(2), new Integer(3)) = null
 

Parameters:
  value - the Integer to convert
Parameters:
  trueValue - the value to match for true,may be null
Parameters:
  falseValue - the value to match for false,may be null
Parameters:
  nullValue - the value to to match for null,may be null Boolean.TRUE, Boolean.FALSE, or null
throws:
  IllegalArgumentException - if no match



toBooleanObject
public static Boolean toBooleanObject(String str)(Code)

Converts a String to a Boolean.

'true', 'on' or 'yes' (case insensitive) will return true. 'false', 'off' or 'no' (case insensitive) will return false. Otherwise, null is returned.

 BooleanUtils.toBooleanObject(null)    = null
 BooleanUtils.toBooleanObject("true")  = Boolean.TRUE
 BooleanUtils.toBooleanObject("false") = Boolean.FALSE
 BooleanUtils.toBooleanObject("on")    = Boolean.TRUE
 BooleanUtils.toBooleanObject("ON")    = Boolean.TRUE
 BooleanUtils.toBooleanObject("off")   = Boolean.FALSE
 BooleanUtils.toBooleanObject("oFf")   = Boolean.FALSE
 BooleanUtils.toBooleanObject("blue")  = null
 

Parameters:
  str - the String to check the Boolean value of the string,null if no match or null input



toBooleanObject
public static Boolean toBooleanObject(String str, String trueString, String falseString, String nullString)(Code)

Converts a String to a Boolean throwing an exception if no match.

 BooleanUtils.toBooleanObject("true", "true", "false", "null")  = Boolean.TRUE
 BooleanUtils.toBooleanObject("false", "true", "false", "null") = Boolean.FALSE
 BooleanUtils.toBooleanObject("null", "true", "false", "null")  = null
 

Parameters:
  str - the String to check
Parameters:
  trueString - the String to match for true(case sensitive), may be null
Parameters:
  falseString - the String to match for false(case sensitive), may be null
Parameters:
  nullString - the String to match for null(case sensitive), may be null the Boolean value of the string,null if no match or null input



toInteger
public static int toInteger(boolean bool)(Code)

Converts a boolean to an int using the convention that zero is false.

 BooleanUtils.toInteger(true)  = 1
 BooleanUtils.toInteger(false) = 0
 

Parameters:
  bool - the boolean to convert one if true, zero if false



toInteger
public static int toInteger(boolean bool, int trueValue, int falseValue)(Code)

Converts a boolean to an int specifying the conversion values.

 BooleanUtils.toInteger(true, 1, 0)  = 1
 BooleanUtils.toInteger(false, 1, 0) = 0
 

Parameters:
  bool - the to convert
Parameters:
  trueValue - the value to return if true
Parameters:
  falseValue - the value to return if false the appropriate value



toInteger
public static int toInteger(Boolean bool, int trueValue, int falseValue, int nullValue)(Code)

Converts a Boolean to an int specifying the conversion values.

 BooleanUtils.toInteger(Boolean.TRUE, 1, 0, 2)  = 1
 BooleanUtils.toInteger(Boolean.FALSE, 1, 0, 2) = 0
 BooleanUtils.toInteger(null, 1, 0, 2)          = 2
 

Parameters:
  bool - the Boolean to convert
Parameters:
  trueValue - the value to return if true
Parameters:
  falseValue - the value to return if false
Parameters:
  nullValue - the value to return if null the appropriate value



toIntegerObject
public static Integer toIntegerObject(boolean bool)(Code)

Converts a boolean to an Integer using the convention that zero is false.

 BooleanUtils.toIntegerObject(true)  = new Integer(1)
 BooleanUtils.toIntegerObject(false) = new Integer(0)
 

Parameters:
  bool - the boolean to convert one if true, zero if false



toIntegerObject
public static Integer toIntegerObject(Boolean bool)(Code)

Converts a Boolean to a Integer using the convention that zero is false.

null will be converted to null.

 BooleanUtils.toIntegerObject(Boolean.TRUE)  = new Integer(1)
 BooleanUtils.toIntegerObject(Boolean.FALSE) = new Integer(0)
 

Parameters:
  bool - the Boolean to convert one if Boolean.TRUE, zero if Boolean.FALSE, null if null



toIntegerObject
public static Integer toIntegerObject(boolean bool, Integer trueValue, Integer falseValue)(Code)

Converts a boolean to an Integer specifying the conversion values.

 BooleanUtils.toIntegerObject(true, new Integer(1), new Integer(0))  = new Integer(1)
 BooleanUtils.toIntegerObject(false, new Integer(1), new Integer(0)) = new Integer(0)
 

Parameters:
  bool - the to convert
Parameters:
  trueValue - the value to return if true,may be null
Parameters:
  falseValue - the value to return if false,may be null the appropriate value



toIntegerObject
public static Integer toIntegerObject(Boolean bool, Integer trueValue, Integer falseValue, Integer nullValue)(Code)

Converts a Boolean to an Integer specifying the conversion values.

 BooleanUtils.toIntegerObject(Boolean.TRUE, new Integer(1), new Integer(0), new Integer(2))  = new Integer(1)
 BooleanUtils.toIntegerObject(Boolean.FALSE, new Integer(1), new Integer(0), new Integer(2)) = new Integer(0)
 BooleanUtils.toIntegerObject(null, new Integer(1), new Integer(0), new Integer(2))          = new Integer(2)
 

Parameters:
  bool - the Boolean to convert
Parameters:
  trueValue - the value to return if true,may be null
Parameters:
  falseValue - the value to return if false,may be null
Parameters:
  nullValue - the value to return if null,may be null the appropriate value



toString
public static String toString(Boolean bool, String trueString, String falseString, String nullString)(Code)

Converts a Boolean to a String returning one of the input Strings.

 BooleanUtils.toString(Boolean.TRUE, "true", "false", null)   = "true"
 BooleanUtils.toString(Boolean.FALSE, "true", "false", null)  = "false"
 BooleanUtils.toString(null, "true", "false", null)           = null;
 

Parameters:
  bool - the Boolean to check
Parameters:
  trueString - the String to return if true,may be null
Parameters:
  falseString - the String to return if false,may be null
Parameters:
  nullString - the String to return if null,may be null one of the three input Strings



toString
public static String toString(boolean bool, String trueString, String falseString)(Code)

Converts a boolean to a String returning one of the input Strings.

 BooleanUtils.toString(true, "true", "false")   = "true"
 BooleanUtils.toString(false, "true", "false")  = "false"
 

Parameters:
  bool - the Boolean to check
Parameters:
  trueString - the String to return if true,may be null
Parameters:
  falseString - the String to return if false,may be null one of the two input Strings



toStringOnOff
public static String toStringOnOff(Boolean bool)(Code)

Converts a Boolean to a String returning 'on', 'off', or null.

 BooleanUtils.toStringOnOff(Boolean.TRUE)  = "on"
 BooleanUtils.toStringOnOff(Boolean.FALSE) = "off"
 BooleanUtils.toStringOnOff(null)          = null;
 

Parameters:
  bool - the Boolean to check 'on', 'off',or null



toStringOnOff
public static String toStringOnOff(boolean bool)(Code)

Converts a boolean to a String returning 'on' or 'off'.

 BooleanUtils.toStringOnOff(true)   = "on"
 BooleanUtils.toStringOnOff(false)  = "off"
 

Parameters:
  bool - the Boolean to check 'on', 'off',or null



toStringTrueFalse
public static String toStringTrueFalse(Boolean bool)(Code)

Converts a Boolean to a String returning 'true', 'false', or null.

 BooleanUtils.toStringTrueFalse(Boolean.TRUE)  = "true"
 BooleanUtils.toStringTrueFalse(Boolean.FALSE) = "false"
 BooleanUtils.toStringTrueFalse(null)          = null;
 

Parameters:
  bool - the Boolean to check 'true', 'false',or null



toStringTrueFalse
public static String toStringTrueFalse(boolean bool)(Code)

Converts a boolean to a String returning 'true' or 'false'.

 BooleanUtils.toStringTrueFalse(true)   = "true"
 BooleanUtils.toStringTrueFalse(false)  = "false"
 

Parameters:
  bool - the Boolean to check 'true', 'false',or null



toStringYesNo
public static String toStringYesNo(Boolean bool)(Code)

Converts a Boolean to a String returning 'yes', 'no', or null.

 BooleanUtils.toStringYesNo(Boolean.TRUE)  = "yes"
 BooleanUtils.toStringYesNo(Boolean.FALSE) = "no"
 BooleanUtils.toStringYesNo(null)          = null;
 

Parameters:
  bool - the Boolean to check 'yes', 'no',or null



toStringYesNo
public static String toStringYesNo(boolean bool)(Code)

Converts a boolean to a String returning 'yes' or 'no'.

 BooleanUtils.toStringYesNo(true)   = "yes"
 BooleanUtils.toStringYesNo(false)  = "no"
 

Parameters:
  bool - the Boolean to check 'yes', 'no',or null



xor
public static boolean xor(boolean[] array)(Code)

Performs an xor on a set of booleans.

 BooleanUtils.xor(new boolean[] { true, true })   = false
 BooleanUtils.xor(new boolean[] { false, false }) = false
 BooleanUtils.xor(new boolean[] { true, false })  = true
 

Parameters:
  array - an array of booleans true if the xor is successful.
throws:
  IllegalArgumentException - if array is null
throws:
  IllegalArgumentException - if array is empty.



xor
public static Boolean xor(Boolean[] array)(Code)

Performs an xor on an array of Booleans.

 BooleanUtils.xor(new Boolean[] { Boolean.TRUE, Boolean.TRUE })   = Boolean.FALSE
 BooleanUtils.xor(new Boolean[] { Boolean.FALSE, Boolean.FALSE }) = Boolean.FALSE
 BooleanUtils.xor(new Boolean[] { Boolean.TRUE, Boolean.FALSE })  = Boolean.TRUE
 

Parameters:
  array - an array of Booleans true if the xor is successful.
throws:
  IllegalArgumentException - if array is null
throws:
  IllegalArgumentException - if array is empty.
throws:
  IllegalArgumentException - if array contains a null



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.