Class ObjectReader

java.lang.Object
org.apache.storm.utils.ObjectReader

public class ObjectReader extends Object
  • Constructor Details

    • ObjectReader

      public ObjectReader()
  • Method Details

    • getStrings

      public static List<String> getStrings(Object o)
      Convert the input into a list of string; ignore null members.
      Parameters:
      o - the input object
      Returns:
      a list of string
    • getString

      public static String getString(Object o)
    • getString

      public static String getString(Object o, String defaultValue)
    • getInt

      public static Integer getInt(Object o)
    • getInt

      public static Integer getInt(Object o, Integer defaultValue)
    • getLong

      public static Long getLong(Object o)
    • getLong

      public static Long getLong(Object o, Long defaultValue)
    • getDouble

      public static Double getDouble(Object o)
    • getDouble

      public static Double getDouble(Object o, Double defaultValue)
    • getBoolean

      public static boolean getBoolean(Object o, boolean defaultValue)