Class Converter

java.lang.Object
jodd.typeconverter.Converter

public class Converter extends Object
Just a convenient TypeConverterManager usage.
  • Field Details

    • CONVERTER

      private static final Converter CONVERTER
  • Constructor Details

    • Converter

      public Converter()
  • Method Details

    • get

      public static Converter get()
      Returns default instance.
    • toBoolean

      public Boolean toBoolean(Object value)
      Converts value to Boolean.
    • toBoolean

      public Boolean toBoolean(Object value, Boolean defaultValue)
      Converts value to Boolean. Returns default value when conversion result is null
    • toBooleanValue

      public boolean toBooleanValue(Object value, boolean defaultValue)
      Converts value to boolean. Returns default value when conversion result is null.
    • toBooleanValue

      public boolean toBooleanValue(Object value)
      Converts value to boolean with common default value.
    • toInteger

      public Integer toInteger(Object value)
      Converts value to Integer.
    • toInteger

      public Integer toInteger(Object value, Integer defaultValue)
      Converts value to Integer. Returns default value when conversion result is null
    • toIntValue

      public int toIntValue(Object value, int defaultValue)
      Converts value to int. Returns default value when conversion result is null.
    • toIntValue

      public int toIntValue(Object value)
      Converts value to int with common default value.
    • toLong

      public Long toLong(Object value)
      Converts value to Long.
    • toLong

      public Long toLong(Object value, Long defaultValue)
      Converts value to Long. Returns default value when conversion result is null
    • toLongValue

      public long toLongValue(Object value, long defaultValue)
      Converts value to long. Returns default value when conversion result is null.
    • toLongValue

      public long toLongValue(Object value)
      Converts value to long with common default value.
    • toFloat

      public Float toFloat(Object value)
      Converts value to Float.
    • toFloat

      public Float toFloat(Object value, Float defaultValue)
      Converts value to Float. Returns default value when conversion result is null
    • toFloatValue

      public float toFloatValue(Object value, float defaultValue)
      Converts value to float. Returns default value when conversion result is null.
    • toFloatValue

      public float toFloatValue(Object value)
      Converts value to float with common default value.
    • toDouble

      public Double toDouble(Object value)
      Converts value to Double.
    • toDouble

      public Double toDouble(Object value, Double defaultValue)
      Converts value to Double. Returns default value when conversion result is null
    • toDoubleValue

      public double toDoubleValue(Object value, double defaultValue)
      Converts value to double. Returns default value when conversion result is null.
    • toDoubleValue

      public double toDoubleValue(Object value)
      Converts value to double with common default value.
    • toShort

      public Short toShort(Object value)
      Converts value to Short.
    • toShort

      public Short toShort(Object value, Short defaultValue)
      Converts value to Short. Returns default value when conversion result is null
    • toShortValue

      public short toShortValue(Object value, short defaultValue)
      Converts value to short. Returns default value when conversion result is null.
    • toShortValue

      public short toShortValue(Object value)
      Converts value to short with common default value.
    • toCharacter

      public Character toCharacter(Object value)
      Converts value to Character.
    • toCharacter

      public Character toCharacter(Object value, Character defaultValue)
      Converts value to Character. Returns default value when conversion result is null
    • toCharValue

      public char toCharValue(Object value, char defaultValue)
      Converts value to char. Returns default value when conversion result is null.
    • toCharValue

      public char toCharValue(Object value)
      Converts value to char with common default value.
    • toByte

      public Byte toByte(Object value)
      Converts value to Byte.
    • toByte

      public Byte toByte(Object value, Byte defaultValue)
      Converts value to Byte. Returns default value when conversion result is null
    • toByteValue

      public byte toByteValue(Object value, byte defaultValue)
      Converts value to byte. Returns default value when conversion result is null.
    • toByteValue

      public byte toByteValue(Object value)
      Converts value to byte with common default value.
    • toBooleanArray

      public boolean[] toBooleanArray(Object value)
      Converts value to boolean[].
    • toIntegerArray

      public int[] toIntegerArray(Object value)
      Converts value to int[].
    • toLongArray

      public long[] toLongArray(Object value)
      Converts value to long[].
    • toFloatArray

      public float[] toFloatArray(Object value)
      Converts value to float[].
    • toDoubleArray

      public double[] toDoubleArray(Object value)
      Converts value to double[].
    • toShortArray

      public short[] toShortArray(Object value)
      Converts value to short[].
    • toCharacterArray

      public char[] toCharacterArray(Object value)
      Converts value to char[].
    • toString

      public String toString(Object value)
      Converts value to String.
    • toString

      public String toString(Object value, String defaultValue)
      Converts value to String. Returns default value when conversion result is null
    • toStringArray

      public String[] toStringArray(Object value)
      Converts value to String[].
    • toClass

      public Class toClass(Object value)
      Converts value to Class.
    • toClassArray

      public Class[] toClassArray(Object value)
      Converts value to Class[].
    • toBigInteger

      public BigInteger toBigInteger(Object value)
      Converts value to BigInteger.
    • toBigInteger

      public BigInteger toBigInteger(Object value, BigInteger defaultValue)
      Converts value to BigInteger. Returns default value when conversion result is null
    • toBigDecimal

      public BigDecimal toBigDecimal(Object value)
      Converts value to BigDecimal.
    • toBigDecimal

      public BigDecimal toBigDecimal(Object value, BigDecimal defaultValue)
      Converts value to BigDecimal. Returns default value when conversion result is null