org.apache.commons.lang

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Natural Language Processing
51.Net
52.Parser
53.PDF
54.Portal
55.Profiler
56.Project Management
57.Report
58.RSS RDF
59.Rule Engine
60.Science
61.Scripting
62.Search Engine
63.Security
64.Sevlet Container
65.Source Control
66.Swing Library
67.Template Engine
68.Test Coverage
69.Testing
70.UML
71.Web Crawler
72.Web Framework
73.Web Mail
74.Web Server
75.Web Services
76.Web Services apache cxf 2.2.6
77.Web Services AXIS2
78.Wiki Engine
79.Workflow Engines
80.XML
81.XML UI
Java Source Code / Java Documentation  » Library » Apache commons lang 2.4 » 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.
DateFormatter.javaClass
DateFormatterTest.javaClass
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 Apache 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 L.
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. Each method documents its behaviour in more detail.


author:
   Nissim Karpenstein
author:
   Janek Bogucki
author:
   Daniel L.
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
  • startsWith - check if a String starts with a prefix null-safe
  • endsWith - check if a String ends with a suffix null-safe
  • IndexOf/LastIndexOf/Contains - null-safe index-of checks
  • IndexOfAny/LastIndexOfAny/IndexOfAnyBut/LastIndexOfAnyBut - index-of any of a set of Strings
  • ContainsOnly/ContainsNone/ContainsAny - does String contains only/none/any 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 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
StringUtilsStartsEndsWithTest.javaClass
StringUtilsSubstringTest.javaClass
StringUtilsTest.javaClass Unit tests org.apache.commons.lang.StringUtils .
author:
   Daniel L.
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.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.
w_w___w__._j___a__v_a___2___s.__co__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.