rns -1 c.compare(new PersonBean("Alex"),new PersonBean("Bob")); // returns 0 c.compare(new PersonBean("Alex"),new PersonBean("Alex)); // returns 1 c.compare(new PersonBean("Bob"),new PersonBean("Bob"));
Note the
property is the name of a JavaBeans property, and according to the JavaBeans specification must start with a lower case letter. So, the property
name
is translated to the method
getName()
using the standard {@link java.beans.Introspector}process.
Note this uses the {@link java.beans.BeanInfo} class to obtain theaccessor method, so that provided a {@link java.beans.BeanInfo} is given, it will work regardless of the nameof the read method.
@author Alex Blewitt <Alex.Blewitt@ioshq.com>
@version 1.0