org.apache.commons.lang

Java Source Code / Java Documentation
1. JDK Core
2. JDK Modules
3. JDK Modules com.sun
4. JDK Modules com.sun.java
5. JDK Modules Platform
6. JDK Modules sun
7. Open Source Build
8. Open Source Graphic Library
9. Open Source IDE Eclipse
10. Open Source J2EE
11. Open Source JDBC Driver
12. Open Source Library
13. Open Source Library Database
14. Open Source Net
15. Open Source Script
16. Science
17. Security
18. Sevlet Container
19. SUN GlassFish
20. Swing Library
21. Web Services apache cxf 2.0.1
22. Web Services AXIS2
23. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java Source Code / Java Documentation » Open Source Library » Apache common lang » org.apache.commons.lang 
org.apache.commons.lang
Provides highly reusable static utility methods, chiefly concerned with adding value to {@link java.lang} and other standard core classes. @since 1.0
Java Source File NameTypeComment
AllLangTestSuite.javaClass Test suite for [lang].
ArrayUtils.javaClass

Operations on arrays, primitive arrays (like int[]) and primitive wrapper arrays (like Integer[]).

This class tries to handle null input gracefully. An exception will not be thrown for a null array input.

ArrayUtilsAddTest.javaClass Tests ArrayUtils add methods.
author:
   Gary D.
ArrayUtilsRemoveTest.javaClass Tests ArrayUtils remove and removeElement methods.
ArrayUtilsTest.javaClass Unit tests org.apache.commons.lang.ArrayUtils .
BitField.javaClass

Operations on bit-mapped fields.


author:
   Apache Jakarta POI
author:
   Scott Sanders (sanders at apache dot org)
author:
   Marc Johnson (mjohnson at apache dot org)
author:
   Andrew C.
BitFieldTest.javaClass
BooleanUtils.javaClass

Operations on boolean primitives and Boolean objects.

This class tries to handle null input gracefully.

BooleanUtilsTest.javaClass Unit tests org.apache.commons.lang.BooleanUtils .
CharEncoding.javaClass

Character encoding names required of every implementation of the Java platform.

According to JRE character encoding names:

Every implementation of the Java platform is required to support the following character encodings.

CharEncodingTest.javaClass Tests CharEncoding.
See Also:   CharEncoding
author:
   Gary D.
CharRange.javaClass
CharRangeTest.javaClass Unit tests org.apache.commons.lang.CharRange .
CharSet.javaClass
CharSetTest.javaClass Unit tests org.apache.commons.lang.CharSet .
CharSetUtils.javaClass

Operations on CharSets.

This class handles null input gracefully.

CharSetUtilsTest.javaClass Unit tests org.apache.commons.lang.CharSetUtils .
author:
   Ringo De Smet
author:
   Stephen Colebourne
author:
   Gary D.
CharUtils.javaClass

Operations on char primitives and Character objects.

This class tries to handle null input gracefully.

CharUtilsPerfTest.javaClass Tests the difference in performance between CharUtils and CharSet. Sample runs: Now: Thu Mar 18 14:29:48 PST 2004 Sun Microsystems Inc.
CharUtilsTest.javaClass Unit tests org.apache.commons.lang.CharUtils .
ClassUtils.javaClass

Operates on classes without using reflection.

This class handles invalid null inputs as best it can.

ClassUtilsTest.javaClass Unit tests org.apache.commons.lang.ClassUtils .
author:
   Stephen Colebourne
author:
   Gary D.
Entities.javaClass

Provides HTML and XML entity utilities.

EntitiesPerformanceTest.javaClass
EntitiesTest.javaClass Unit tests for StringEscapeUtils .
IllegalClassException.javaClass

Thrown when an object is an instance of an unexpected type (a class or interface). This exception supplements the standard IllegalArgumentException by providing a more semantically rich description of the problem.

IllegalClassException represents the case where a method takes in a genericly typed parameter like Object (typically because it has to due to some other interface it implements), but this implementation only actually accepts a specific type, for example String.

IllegalClassExceptionTest.javaClass JUnit tests.
IncompleteArgumentException.javaClass

Thrown to indicate an incomplete argument to a method.

IncompleteArgumentExceptionTest.javaClass JUnit tests.
IntHashMap.javaClass

A hash map that uses primitive ints for the key rather than objects.

Note that this class is for internal optimization purposes only, and may not be supported in future releases of Jakarta Commons Lang.

IntHashMapTest.javaClass Tests for the IntHashMap class.
LangTestSuite.javaClass Test suite for the Lang package.
LocaleUtils.javaClass

Operations to assist when working with a Locale .

This class tries to handle null input gracefully.

LocaleUtilsTest.javaClass Unit tests for LocaleUtils .
NotImplementedException.javaClass

Thrown to indicate that a block of code has not been implemented.

NotImplementedExceptionTest.javaClass JUnit tests.
NullArgumentException.javaClass

Thrown to indicate that an argument was null and should not have been.

NullArgumentExceptionTest.javaClass JUnit tests.
NumberRange.javaClass

Represents a range of Number objects.

This class uses double comparisons.

NumberRangeTest.javaClass Test cases for the NumberRange class.
NumberUtils.javaClass
NumberUtilsTest.javaClass Unit tests org.apache.commons.lang.NumberUtils .
ObjectUtils.javaClass

Operations on Object.

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


author:
   Nissim Karpenstein
author:
   Janek Bogucki
author:
   Daniel Rall
author:
   Stephen Colebourne
author:
   Gary Gregory
author:
   Mario Winterer
author:
   David J.
ObjectUtilsTest.javaClass Unit tests org.apache.commons.lang.ObjectUtils .
RandomStringUtils.javaClass

Operations for random Strings.

Currently private high surrogate characters are ignored.

RandomStringUtilsTest.javaClass Unit tests org.apache.commons.lang.RandomStringUtils .
SerializationException.javaClass
SerializationUtils.javaClass

Assists with the serialization process and performs additional functionality based on serialization.

  • Deep clone using serialization
  • Serialize managing finally and IOException
  • Deserialize managing finally and IOException

This class throws exceptions for invalid null inputs.

SerializationUtilsTest.javaClass Unit tests org.apache.commons.lang.SerializationUtils .
StringEscapeUtils.javaClass
StringEscapeUtilsTest.javaClass Unit tests for StringEscapeUtils .
StringUtils.javaClass

Operations on java.lang.String that are null safe.

  • IsEmpty/IsBlank - checks if a String contains text
  • Trim/Strip - removes leading and trailing whitespace
  • Equals - compares two strings null-safe
  • IndexOf/LastIndexOf/Contains - null-safe index-of checks
  • IndexOfAny/LastIndexOfAny/IndexOfAnyBut/LastIndexOfAnyBut - index-of any of a set of Strings
  • ContainsOnly/ContainsNone - does String contains only/none of these characters
  • Substring/Left/Right/Mid - null-safe substring extractions
  • SubstringBefore/SubstringAfter/SubstringBetween - substring extraction relative to other strings
  • Split/Join - splits a String into an array of substrings and vice versa
  • Remove/Delete - removes part of a String
  • Replace/Overlay - Searches a String and replaces one String with another
  • Chomp/Chop - removes the last part of a String
  • LeftPad/RightPad/Center/Repeat - pads a String
  • UpperCase/LowerCase/SwapCase/Capitalize/Uncapitalize - changes the case of a String
  • CountMatches - counts the number of occurrences of one String in another
  • IsAlpha/IsNumeric/IsWhitespace/IsAsciiPrintable - checks the characters in a String
  • DefaultString - protects against a null input String
  • Reverse/ReverseDelimited - reverses a String
  • Abbreviate - abbreviates a string using ellipsis
  • Difference - compares two Strings and reports on their differences
  • LevensteinDistance - the number of changes needed to change one String into another

The StringUtils class defines certain words related to String handling.

  • null - null
  • empty - a zero-length string ("")
  • space - the space character (' ', char 32)
  • whitespace - the characters defined by Character.isWhitespace(char)
  • trim - the characters <= 32 as in String.trim

StringUtils handles null input Strings quietly. That is to say that a null input will return null. Where a boolean or int is being returned details vary by method.

A side effect of the null handling is that a NullPointerException should be considered a bug in StringUtils (except for deprecated methods).

Methods in this class give sample code to explain their operation. The symbol * is used to indicate any input including null.


See Also:   java.lang.String
author:
   Apache Jakarta Turbine
author:
   Jon S.
StringUtilsEqualsIndexOfTest.javaClass
StringUtilsIsTest.javaClass
StringUtilsSubstringTest.javaClass
StringUtilsTest.javaClass Unit tests org.apache.commons.lang.StringUtils .
author:
   Daniel Rall
author:
   Stephen Colebourne
author:
   Ringo De Smet
author:
   Henning P.
StringUtilsTrimEmptyTest.javaClass
SystemUtils.javaClass
SystemUtilsTest.javaClass Unit tests org.apache.commons.lang.SystemUtils . Only limited testing can be performed.
author:
   Stephen Colebourne
author:
   Tetsuya Kaneuchi
author:
   Gary D.
UnhandledException.javaClass

Thrown when it is impossible or undesirable to consume or throw a checked exception.

This exception supplements the standard exception classes by providing a more semantically rich description of the problem.

UnhandledException represents the case where a method has to deal with a checked exception but does not wish to.

UnhandledExceptionTest.javaClass JUnit tests.
Validate.javaClass

Assists in validating arguments.

The class is based along the lines of JUnit.

ValidateTest.javaClass Unit tests org.apache.commons.lang.util.Validate .
WordUtils.javaClass

Operations on Strings that contain words.

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:
   Apache Jakarta Velocity
author:
   Stephen Colebourne
author:
   Henning P.
WordUtilsTest.javaClass Unit tests for WordUtils class.
www__.__j_a_v___a_2s__._c___o___m | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.