| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Commons Beanutils example source code file (bean-collections.xml)

This example Commons Beanutils source code file (bean-collections.xml) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Commons Beanutils tags/keywords

apache, beanutils, beanutils, collections, collections, for, functors, java, license, license, see, this, you, you

The Commons Beanutils bean-collections.xml source code

<?xml version="1.0"?>
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   See the License for the specific language governing permissions and
   limitations under the License.


  <author email="">Commons Documentation Team


<section name="Commons BeanUtils Bean Collections">

Dealing with collections of beans is a common feature of development in Java.
A lot of time is spent creating bean-specific implementations 
for standard collection manipulators such as functors and comparators.

<code>BeanUtils Bean collections is a library intended to 
improve developer productivity by using sophisticated bean introspection 
(from <code>BeanUtils) 
to allow general library classes to be used (rather than creating bean specific
implementation classes).

But won't this be slower? Yes, reflection is slower than direct references
but in real life applications, this is typically insignificant. So why not use 
these classes to speed development and then substitute faster implementations only
where the profiler indicates there is a problem :) 
    <subsection name='Quick-Quick Guide To Functors'>
Many of the classes in <code>bean-collections are functor implementations
specialized for bean properties. This is a very quick guide (aimed to let java developer
know why functors make for elegant code).
The word <code>functor is mathematical in origin but comes into object oriented
development from functional and logic coding. In Java terms, a functor 
is a function that is encapsulated as an object (and so can be manipulated as an object).
This allows elegant, concise and powerful techniques to be used. For example, 
<a href=''>Commons Collections
contains utilities that allow functions (as functors) to be easily applied to 
This is actually pretty useful when it comes to collections of beans. It's a common 
problem to want to extract information from a collection of beans or to change all properties
to a particular value. Functors can be a particularly elegant way to do this. So try them!
You might just like them!
For more information about functors, please read the introduction to the
<a href=''>Commons Functor component.
<section name='Releases'>
BeanUtils Bean-Collections is distributed as an optional jar within the main 
beanutils distribution. For details, see the 
<a href=''>main BeanUtils website


Other Commons Beanutils examples (source code examples)

Here is a short list of links related to this Commons Beanutils bean-collections.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.