Package org.moeaframework.util.format
Interface Formatter<T>
- Type Parameters:
T- the type of object this can format
- All Known Implementing Classes:
ConstraintFormatter,NumberFormatter,ObjectiveFormatter,VariableFormatter
public interface Formatter<T>
Formats an object of some type into a string.
-
Method Summary
Modifier and TypeMethodDescriptionFormats the given value into a string representation.default StringFormats a list of values into a string representation.default StringFormats a stream of values into a string representation.getType()Returns the class (or classes using inheritance) this formatter supports.
-
Method Details
-
getType
Returns the class (or classes using inheritance) this formatter supports.- Returns:
- the class
-
format
Formats the given value into a string representation.- Parameters:
value- the value- Returns:
- the string representation
-
format
Formats a list of values into a string representation. The follows the same formatting asArrays.toString(Object[]).- Parameters:
values- the list of values- Returns:
- the string representation
-
format
Formats a stream of values into a string representation. The follows the same formatting asArrays.toString(Object[]).- Parameters:
values- the stream of values- Returns:
- the string representation
-