Class SpreadsheetUtils

java.lang.Object
org.eclipse.epsilon.emc.spreadsheets.SpreadsheetUtils

public class SpreadsheetUtils extends Object
This class provides support methods.
Author:
Martins Francis
  • Constructor Details

    • SpreadsheetUtils

      public SpreadsheetUtils()
  • Method Details

    • removeFirstChar

      public static void removeFirstChar(StringBuilder sb)
    • removeFirst

      public static void removeFirst(StringBuilder sb, String leadingChars)
    • removeLastChar

      public static void removeLastChar(StringBuilder sb)
    • removeLast

      public static void removeLast(StringBuilder sb, String trailingChars)
    • getValueConformingToDataType

      public static String getValueConformingToDataType(SpreadsheetColumn column, String value)
    • extractAllRowsFromObject

      public static List<SpreadsheetRow> extractAllRowsFromObject(Object object)
      This method returns all SpreadsheetRow instances contained by the given object.
      Parameters:
      object -
      Returns:
      list of SpreadsheetRow instances
    • extractMapFromCollection

      public static Map<String,Object> extractMapFromCollection(Collection<Object> collection)
      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

      public static String convertObjectToString(SpreadsheetColumn column, Object inputValue)
      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

      public static List<String> convertObjectToList(Object value)
      This method creates list representation of the given object.
      Parameters:
      column -
      value -
      Returns:
      list representation of the given object