Package org.apache.juneau.junit.bct
Interface Sizer<T>
- Type Parameters:
T- The type of object this sizer handles.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for computing the size of objects in test assertions.
Sizers are used by BeanConverter.size(Object) to determine the size of collection-like
objects when validating test assertions. This provides a flexible way to compute sizes for custom
types without needing to convert them to lists first.
Usage Example:
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintsize(T o, BeanConverter bc) Computes the size of the given object.
-
Method Details
-
size
Computes the size of the given object.- Parameters:
o- The object to compute the size of. Will not benull .bc- The bean converter for accessing additional conversion utilities if needed.- Returns:
- The size of the object.
-