pl.bristleback.server.bristle.binding.resolvers
Class DoublePropertyResolver

java.lang.Object
  extended by pl.bristleback.server.bristle.binding.resolvers.DoublePropertyResolver
All Implemented Interfaces:
PropertyValueResolver<java.lang.Double>

public class DoublePropertyResolver
extends java.lang.Object
implements PropertyValueResolver<java.lang.Double>

This property resolver checks the type of the given value, returns the same object if value type is Double or uses Double.parseDouble(String) otherwise. Every comma is replaced by dot.

Created on: 2011-02-24 15:31:16

Author:
Wojciech Niemiec

Constructor Summary
DoublePropertyResolver()
           
 
Method Summary
 java.lang.Double extractValue(java.lang.Object value)
          Extracts value given as parameter and process it to be of desired type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoublePropertyResolver

public DoublePropertyResolver()
Method Detail

extractValue

public java.lang.Double extractValue(java.lang.Object value)
Description copied from interface: PropertyValueResolver
Extracts value given as parameter and process it to be of desired type.

Specified by:
extractValue in interface PropertyValueResolver<java.lang.Double>
Parameters:
value - value to extract.
Returns:
processed value or null if given value cannot be processed.


Copyright © 2011. All Rights Reserved.