|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.query.conditions.numbers.NumberAdapter<N>
N
- the kind of number to which I adapt input valuespublic class NumberAdapter<N extends Number & Comparable<? super N>>
An Adapter class to be used to extract from -adapt- the argument object to some numeric value that would later be used in Condition evaluation. Clients can subclass it and provide their own implementation.
Since the 1.2 release, this class is no longer abstract and can be used as a generic number adapter for all number types.
NumberCondition
Nested Class Summary | |
---|---|
static class |
NumberAdapter.ByteAdapter
A subclass of NumberAdapter to be used to adapt an
argument object to byte values Clients can either use the
default implementation supplied or have their own. |
static class |
NumberAdapter.DoubleAdapter
A subclass of NumberAdapter to be used to adapt an
argument object to double values Clients can either use
the default implementation supplied or have their own. |
static class |
NumberAdapter.FloatAdapter
A subclass of NumberAdapter to be used to adapt an
argument object to float values Clients can either use the
default implementation supplied or have their own. |
static class |
NumberAdapter.IntegerAdapter
A subclass of NumberAdapter to be used to adapt an
argument object to int values Clients can either use the
default implementation supplied or have their own. |
static class |
NumberAdapter.LongAdapter
A subclass of NumberAdapter to be used to adapt an
argument object to long values Clients can either use the
default implementation supplied or have their own. |
static class |
NumberAdapter.ShortAdapter
A subclass of NumberAdapter to be used to adapt an
argument object to short values Clients can either use the
default implementation supplied or have their own. |
Constructor Summary | |
---|---|
NumberAdapter()
Initializes me as a default number adapter, that simply assumes that input values are of my number kind and casts them appropriately. |
Method Summary | ||
---|---|---|
N |
adapt(Object value)
Adapts the specified input value to the type that I provide. |
|
static
|
getDefault()
Obtains a default number adapter, that simply assumes that input values are of the required number kind and casts them appropriately. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumberAdapter()
Method Detail |
---|
public static <N extends Number & Comparable<? super N>> NumberAdapter<N> getDefault()
public N adapt(Object value)
IDataTypeAdapter
adapt
in interface IDataTypeAdapter<N extends Number & Comparable<? super N>>
value
- the input value
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |