Class SpreadsheetUtils
java.lang.Object
org.eclipse.epsilon.emc.spreadsheets.SpreadsheetUtils
This class provides support methods.
- Author:
- Martins Francis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertObjectToList(Object value) This method creates list representation of the given object.static StringconvertObjectToString(SpreadsheetColumn column, Object inputValue) This method creates a string representation of the given object.static List<SpreadsheetRow>extractAllRowsFromObject(Object object) This method returns all SpreadsheetRow instances contained by the given object.extractMapFromCollection(Collection<Object> collection) This method extracts Map from the given collection - it assumes the first object contained by it is a Map.static StringgetValueConformingToDataType(SpreadsheetColumn column, String value) static voidremoveFirst(StringBuilder sb, String leadingChars) static voidstatic voidremoveLast(StringBuilder sb, String trailingChars) static void
-
Constructor Details
-
SpreadsheetUtils
public SpreadsheetUtils()
-
-
Method Details
-
removeFirstChar
-
removeFirst
-
removeLastChar
-
removeLast
-
getValueConformingToDataType
-
extractAllRowsFromObject
This method returns all SpreadsheetRow instances contained by the given object.- Parameters:
object-- Returns:
- list of SpreadsheetRow instances
-
extractMapFromCollection
This method extracts Map from the given collection - it assumes the first object contained by it is a Map. If the collection is empty or null then an empty Map is returned.- Parameters:
collection-- Returns:
- Map
-
convertObjectToString
This method creates a string representation of the given object. If it is an Iterable object then a delimiter separated string is created.- Parameters:
column-inputValue-- Returns:
- string representation of the given object
-
convertObjectToList
This method creates list representation of the given object.- Parameters:
column-value-- Returns:
- list representation of the given object
-