Class TypeConverter

java.lang.Object
com.swiftmq.impl.streams.TypeConverter

public class TypeConverter extends Object
Convenience class to convert an object into various basic types. It is accessible from Streams scripts via variable "typeconvert".
Author:
IIT Software GmbH, Muenster/Germany, (c) 2020, All Rights Reserved
  • Constructor Details

    • TypeConverter

      public TypeConverter()
  • Method Details

    • toBoolean

      public boolean toBoolean(Object o)
      Convert an object to Boolean
      Parameters:
      o - Object
      Returns:
      Boolean
    • toInteger

      public int toInteger(Object o) throws Exception
      Convert an object to Integer
      Parameters:
      o - Object
      Returns:
      Integer
      Throws:
      Exception
    • toLong

      public long toLong(Object o) throws Exception
      Convert an object to Long
      Parameters:
      o - Object
      Returns:
      Long
      Throws:
      Exception
    • toDouble

      public double toDouble(Object o) throws Exception
      Convert an object to Double
      Parameters:
      o - Object
      Returns:
      Double
      Throws:
      Exception
    • toFloat

      public double toFloat(Object o) throws Exception
      Convert an object to Float
      Parameters:
      o - Object
      Returns:
      Float
      Throws:
      Exception