public class PropertyCollectionUtil extends Object
Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_SUBNAME_DIVIDER
The default divider for sub names grouping, the value is [.]
|
Modifier and Type | Method and Description |
---|---|
static int |
getInvalidCount(List<PropertyValidationVO> list)
Gets how many is invalid in a list of PropertyValidationVO
|
static String |
getPropertyGroupName(Property<?> property)
Gets the "group" of the property name using the default divider.
|
static String |
getPropertyGroupName(Property<?> property,
char subNameDivider)
Gets the "group" of the property name
|
static List<Property<?>> |
getPropertyListStartWiths(PropertyCollection collection,
String name,
boolean caseSensitive)
Retrieves a list of properties which name starts with a specific string.
|
static List<String> |
getPropertyNameGroups(PropertyCollection collection)
See method [getPropertyNameGroups(PropertyCollection, boolean, char)] for description.
|
static List<String> |
getPropertyNameGroups(PropertyCollection collection,
char subNameDivider)
This methods returns a list of group names, which the properties can de divided into.
|
static int |
getValidCount(List<PropertyValidationVO> list)
Gets how many is valid in a list of PropertyValidationVO
|
public static final char DEFAULT_SUBNAME_DIVIDER
public static List<String> getPropertyNameGroups(PropertyCollection collection)
collection
- The collection of properties to group names.getPropertyNameGroups(PropertyCollection, char)
public static List<String> getPropertyNameGroups(PropertyCollection collection, char subNameDivider)
subNameDivider
. subNameDivider
is [.] : collection
- The collection of properties to group names.subNameDivider
- the char which divides the property name into parts.public static String getPropertyGroupName(Property<?> property, char subNameDivider)
property
- the property which name we analyze.subNameDivider
- the char to look for in the name.public static String getPropertyGroupName(Property<?> property)
property
- the propertyDEFAULT_SUBNAME_DIVIDER
public static List<Property<?>> getPropertyListStartWiths(PropertyCollection collection, String name, boolean caseSensitive)
collection
- The collection of properties.name
- the names which the property must start with.caseSensitive
- the name compare sensitive or not.public static int getValidCount(List<PropertyValidationVO> list)
list
- the list.null
0 is returned.public static int getInvalidCount(List<PropertyValidationVO> list)
list
- the list.null
0 is returned.