org.mmbase.util
Interface Caster

All Known Implementing Classes:
BasicCaster, BridgeCaster

public interface Caster

Since:
MMBase-2.0

Nested Class Summary
static class Caster.NotRecognized
           
 
Method Summary
 boolean isStringRepresentable(Class<?> type)
           
 boolean toBoolean(Object i)
           
 double toDouble(Object i)
           
 float toFloat(Object i)
           
 int toInt(Object i)
           
 long toLong(Object i)
           
 Map toMap(Object o)
           
 String toString(Object o)
           
<C> C
toType(Class<C> type, Object cloud, Object value)
           
 Object unWrap(Object o)
           
 Object wrap(Object o, CharTransformer escaper)
           
 

Method Detail

toType

<C> C toType(Class<C> type,
             Object cloud,
             Object value)
         throws Caster.NotRecognized
Throws:
Caster.NotRecognized

wrap

Object wrap(Object o,
            CharTransformer escaper)
            throws Caster.NotRecognized
Throws:
Caster.NotRecognized

unWrap

Object unWrap(Object o)
              throws Caster.NotRecognized
Throws:
Caster.NotRecognized

toMap

Map toMap(Object o)
          throws Caster.NotRecognized
Throws:
Caster.NotRecognized

toInt

int toInt(Object i)
          throws Caster.NotRecognized
Throws:
Caster.NotRecognized

toLong

long toLong(Object i)
            throws Caster.NotRecognized
Throws:
Caster.NotRecognized

toFloat

float toFloat(Object i)
              throws Caster.NotRecognized
Throws:
Caster.NotRecognized

toDouble

double toDouble(Object i)
                throws Caster.NotRecognized
Throws:
Caster.NotRecognized

toBoolean

boolean toBoolean(Object i)
                  throws Caster.NotRecognized
Throws:
Caster.NotRecognized

toString

String toString(Object o)
                throws Caster.NotRecognized
Throws:
Caster.NotRecognized

isStringRepresentable

boolean isStringRepresentable(Class<?> type)


MMBase 2.0-SNAPSHOT - null