Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Commons Lang

Wiki Markup\[http://jakarta.apache.org/commons/lang Lang\] aims to provide:

  • Comprehensive String handling utilities
  • Enumerated types (pre JDK 1.5)
  • Nested exceptions (pre JDK 1.4)
  • Builders to create hashCode, equals, toString and compareTo methods
  • Utilities for Object, Date and Numbers

...


The Javadoc of the latest version is \[http://jakarta.apache.org/commons/lang/api/index.html available\](2.1) is available.

The Javadoc of the CVS version (development) is available.

Development plan for 2.

...

2

  1. Bug fixes
  2. StrTokenizer
  3. StrBuilder
  4. VariableFormatter/interpolator - 18962

Other ideas

  1. Wiki Markup
    [

    StringUtils].ordinalIndexOf() 2. [StringBuffer] replacement 3. Mutable Number classes 4. [StringTokenizer] replacement: (DONE - Tokenizer) 5. 15082 \[lang\] elapsed time formatting utility method 5. 18962 \[lang\] New Method: getSubstitutedValues( String, Map ) 5. 19331 \[lang\] General case: infinite loop: [ToStringBuilder].reflectionToString 5. 20015 \[lang\] Make Entities public and unit test 5. 21333 Add [TimeoutController] 5. 21663

    21663|http://issues.apache.org/bugzilla/show_bug.cgi?id=21663] 	\[lang\] Add support in [ToStringStyle] for [DateFormat]. 

    5. 22172 \[lang\] [DateUtils].parseCVS behavior parsing "h:mm z" 5. 22692 [StringUtils].split ignores empty items 5. 22717

    - *Grows quickly into commons-convert*

  2. Wiki Markup
    [27643|http://issues.apache.org/bugzilla/show_bug.cgi?id=27643] 	\[lang\

    ] mutable numbers 5. 23356 make [DurationFormatUtils] public! 5. 23557 [WordUtils

    ]

    .capitalizeFully(String str) should take a delimiter 5. 23749

    \[

    lang

    patch\] 

    \

    [

    PATCH\

    ClassUtils].newInstance 

    [NumberRange]

    method - 

    adds inclusive and exclusive end points 5. 24910

    *Seems unnecessary*

  3. Wiki Markup
    [29149|http://issues.apache.org/bugzilla/show_bug.cgi?id=29149]

    new [StringUtils].split methods that split on the whole separator string 5. 25227

     	\[lang\] [StringEscapeUtils].unescapeHtml() doesn't handle an 

    hex

    empty 

    entities

    entity 

    5.

    - 

    25560 [DateUtils].truncate()

    *Empty entity is 

    off

    in 

    by

    fact 

    one

    illegal 

    hour

    HTML, 

    when

    so 

    using

    need 

    a

    to 

    date

    decide 

    in

    if 

    DST

    we 

    switch 'zone' 5. 26056 \[lang\] Add methods to [ArrayUtils]: add at end and insert-like ops 5. 26297 \[lang\] [BitSetUtils] class, toIndexArray and fromIndexArray 5. 26659

    should ignore. Current behaviour seems acceptable as we're not in the work with bad HTML market.*

  4. Wiki Markup
    [26659|http://issues.apache.org/bugzilla/show_bug.cgi?id=26659] 	\[lang\] add method to [DateUtils] to get the distance between 2 dates 

    5.

    - 

    26922 \[lang\] public static boolean [DateUtils].equals(Date dt1, Date dt2) ? 5. 27592

    *Mainly replicated by [DurationFormatUtils], or non-obvious*

  5. Wiki Markup
    [29692|http://issues.apache.org/bugzilla/show_bug.cgi?id=29692] 	\[lang\]

    [

     String indentation feature request - *Needs design as a non-simple problem*

  6. Wiki Markup
    [22172|http://issues.apache.org/bugzilla/show_bug.cgi?id=22172]

    WordUtils] capitalize improvement 5. 27640 \[lang\]\[patch\] [ClassUtils].primitivesToWrappers method 5. 27643

     	\[lang\]

    \[patch\]

     [

    ClassUtils

    DateUtils].

    newInstance

    parseCVS 

    method

    behavior 

    5. 27778 \[lang\] add remove methods to [ArrayUtils] 5. 27876 \[lang\] [ReflectionToStringBuilder].toString(null) throws exception by design 5. 27877

    parsing "h:mm z" - *Moved to sandbox*

  7. Wiki Markup
    [26297|http://issues.apache.org/bugzilla/show_bug.cgi?id=26297] 	\[lang

    \]\[patch

    \] 

    Make

    [

    ClassUtils

    BitSetUtils] 

    methods null-safe

    class, toIndexArray and fromIndexArray

  8. 21333 Add TimeoutController - Class in HttpClient. Leaving til 3.0 as not throw an IAE. 5. 29149 \[lang\] [StringEscapeUtils].unescapeHtml() doesn't handle an empty entity 5. 29163 Make [StopWatch] validate state transitions 5. 29294 \[lang\]\[PATCH\] lang.math.Fraction class deficienciesmuch movement on it
  9. Wiki Markup
    [30674|http://issues.apache.org/bugzilla/show_bug.cgi?id=30674]     Support [HttpClient]'s [DateParser] class - *This is basically a Date parseDate(String dateValue, String\[\] dateFormats) method.*

  10. LocaleUtils - including toLocale(String,String)
  11. CloneUtils - multiple ways to clone an object

Articles

This article http://www.devx.com/Java/Article/29392/0/page/6 discusses some of the interesting classes in Commons Lang with real world examples.