类 MapToDateMorpher

java.lang.Object
com.sh.json.ezmorph.object.AbstractObjectMorpher
com.sh.json.ezmorph.object.MapToDateMorpher
所有已实现的接口:
Morpher, ObjectMorpher

public class MapToDateMorpher extends AbstractObjectMorpher
Morphs a Map into a Date.
The Map should have at least one of the following keys [yer,month,day,hour,minutes,seconds,milliseconds] and the values should be instances of Number. Any key that is not defined will have zero (0) assigned as its value.
  • 构造器详细资料

    • MapToDateMorpher

      public MapToDateMorpher()
    • MapToDateMorpher

      public MapToDateMorpher(Date defaultValue)
  • 方法详细资料

    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • getDefaultValue

      public Date getDefaultValue()
      Returns the default value for this Morpher.
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • morph

      public Object morph(Object value)
      从接口复制的说明: ObjectMorpher
      Morphs the input object into an output object of the supported type.
      参数:
      value - The input value to be morphed
    • morphsTo

      public Class<?> morphsTo()
      从接口复制的说明: Morpher
      Returns the target Class for conversion.
      返回:
      the target Class for conversion.
    • setDefaultValue

      public void setDefaultValue(Date defaultValue)
      Sets the defaultValue to use if the value to be morphed is null.
      参数:
      defaultValue - return value if the value to be morphed is null
    • supports

      public boolean supports(Class<?> clazz)
      从类复制的说明: AbstractObjectMorpher
      Returns true if the Morpher supports conversion from this Class.
      Supports any type that is not an Array.
      指定者:
      supports 在接口中 Morpher
      覆盖:
      supports 在类中 AbstractObjectMorpher
      参数:
      clazz - the source Class
      返回:
      true if clazz is supported by this morpher, false otherwise.