## org.eclipse.emf.query.conditions.numbers
Class NumberAdapter<N extends Number & Comparable<? super N>>

    java.lang.Object
      org.eclipse.emf.query.conditions.numbers.NumberAdapter<N>

Type Parameters:
  `N` - the kind of number to which I adapt input values

All Implemented Interfaces:
  IDataTypeAdapter<N>

Direct Known Subclasses:
  NumberAdapter.ByteAdapter, NumberAdapter.DoubleAdapter, NumberAdapter.FloatAdapter, NumberAdapter.IntegerAdapter, NumberAdapter.LongAdapter, NumberAdapter.ShortAdapter

    public class NumberAdapter<N extends Number & Comparable<? super N>>

extends Object
implements IDataTypeAdapter<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.

See Also:
  `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

`<N extends Number & Comparable<? super N>> NumberAdapter<N>`

`

`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

### NumberAdapter

    public NumberAdapter()

  Initializes me as a default number adapter, that simply assumes that input values are of my number kind and casts them appropriately.

  Since:
    1.2

Method Detail

### getDefault

    public static <N extends Number & Comparable<? super N>> NumberAdapter<N> getDefault()

  Obtains a default number adapter, that simply assumes that input values are of the required number kind and casts them appropriately.

  Since:
    1.2

### adapt

    public N adapt(Object value)

  Description copied from interface: `IDataTypeAdapter`
  Adapts the specified input value to the type that I provide.

  Specified by:
    `adapt` in interface `IDataTypeAdapter<N extends Number & Comparable<? super N>>`
  Parameters:
    `value` - the input value
  Returns:
    the corresponding output value

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.