|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.assertions.internal.PropertySupport
public class PropertySupport
Utility methods for properties access.
Method Summary | |
---|---|
static PropertySupport |
instance()
Returns the singleton instance of this class. |
List<Object> |
propertyValues(String propertyName,
Collection<?> target)
Returns a containing the values of the given property name, from the elements of the
given . |
static List<Object> |
propertyValuesOf(String propertyName,
Collection<?> target)
Static variant of propertyValue(String, Object) for synthetic sugar. |
static List<Object> |
propertyValuesOf(String propertyName,
Object[] target)
Returns a containing the values of the given property name, from the elements of the
given array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PropertySupport instance()
public List<Object> propertyValues(String propertyName, Collection<?> target)
List
containing the values of the given property name, from the elements of the
given Collection
. If the given Collection
is empty or null
, this method will
return an empty List
. This method supports nested properties (e.g. "address.street.number").
propertyName
- the name of the property. It may be a nested property. It is left to the clients to validate
for null
or empty.target
- the given Collection
.
List
containing the values of the given property name, from the elements of the given
Collection
.
org.fest.util.IntrospectionError
- if an element in the given Collection
does not have a property with a matching
name.public static List<Object> propertyValuesOf(String propertyName, Collection<?> target)
propertyValue(String, Object)
for synthetic sugar.
Returns a
containing the values of the given property name, from the elements of the
given List
. If the given Collection
Collection
is empty or null
, this method will
return an empty List
. This method supports nested properties (e.g. "address.street.number").
propertyName
- the name of the property. It may be a nested property. It is left to the clients to validate
for null
or empty.target
- the given Collection
.
List
containing the values of the given property name, from the elements of the given
Collection
.
org.fest.util.IntrospectionError
- if an element in the given Collection
does not have a property with a matching
name.public static List<Object> propertyValuesOf(String propertyName, Object[] target)
List
containing the values of the given property name, from the elements of the
given array. If the given array is empty or null
, this method will return an empty List
. This
method supports nested properties (e.g. "address.street.number").
propertyName
- the name of the property. It may be a nested property. It is left to the clients to validate
for null
or empty.target
- the given array.
List
containing the values of the given property name, from the elements of the given array.
org.fest.util.IntrospectionError
- if an element in the given array does not have a property with a matching name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |