All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperscala.ui.convert.LongConverter.scala Maven / Gradle / Ivy

There is a newer version: 0.10.3
Show newest version
package org.hyperscala.ui.convert

import org.powerscala.reflect.EnhancedClass

/**
 * @author Matt Hicks 
 */
class LongConverter(pre: String = "", post: String = "") extends Converter[Long] {
  def value2String(value: Long) = s"$pre$value$post"

  def string2Value(s: String, clazz: EnhancedClass) = DoubleConverter.string2Value(s, clazz).map(d => math.round(d))
}

object LongConverter extends LongConverter(pre = "", post = "")




© 2015 - 2024 Weber Informatics LLC | Privacy Policy