Class Assert
- java.lang.Object
-
- com.github.adminfaces.template.util.Assert
-
- All Implemented Interfaces:
Serializable
public class Assert extends Object implements Serializable
Created by rafael-pestano on 26/06/2015. assertions utils- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontains(String textToSearch, String substring)static booleanhas(Object object)static booleanhas(Object[] array)static booleanhas(String text)static booleanhas(Collection<?> collection)static booleanhas(Map<?,?> map)static booleanstartsWithOneOf(String string, String... prefixes)
-
-
-
Method Detail
-
has
public static boolean has(Object object)
- Parameters:
object- object to check if null- Returns:
- TRUE assertion when given objects is not null, FALSE otherwise
-
has
public static boolean has(String text)
- Parameters:
text- text to check for characters- Returns:
- TRUE when given text has any character, FALSE otherwise
-
contains
public static boolean contains(String textToSearch, String substring)
- Parameters:
textToSearch- the text to searchsubstring- string to check in text- Returns:
- TRUE when given text contains the given substring, FALSE otherwise
-
has
public static boolean has(Object[] array)
- Parameters:
array- array to check for presence of elements- Returns:
- TRUE when given array has elements; that is, it must not be
nulland must have at least one element. FALSE otherwise
-
has
public static boolean has(Collection<?> collection)
- Parameters:
collection- collection to check for presence of elements- Returns:
- TRUE when given collection has elements; that is, it must not be
nulland must have at least one element. @return FALSE otherwise
-
has
public static boolean has(Map<?,?> map)
- Parameters:
map- map to check entries- Returns:
- TRUE if given Map has entries; that is, it must not be
nulland must have at least one entry. Queue FALSE otherwise
-
-