org.qi4j.api.property
Class Numbers

java.lang.Object
  extended by org.qi4j.api.property.Numbers

public final class Numbers
extends java.lang.Object

Convenience class for mathematical operations on numerical properties.

import static org.qi4j.api.property.Numbers.*;
 ...
 add( object.numberProperty(), 5 );


Constructor Summary
Numbers()
           
 
Method Summary
static Property<java.math.BigDecimal> add(Property<java.math.BigDecimal> property, java.math.BigDecimal amount)
           
static Property<java.lang.Double> add(Property<java.lang.Double> property, double amount)
           
static Property<java.lang.Float> add(Property<java.lang.Float> property, float amount)
           
static Property<java.lang.Integer> add(Property<java.lang.Integer> property, int amount)
           
static Property<java.lang.Long> add(Property<java.lang.Long> property, long amount)
           
static Property<java.math.BigDecimal> div(Property<java.math.BigDecimal> property, java.math.BigDecimal amount)
           
static Property<java.lang.Double> div(Property<java.lang.Double> property, double amount)
           
static Property<java.lang.Float> div(Property<java.lang.Float> property, float amount)
           
static Property<java.lang.Integer> div(Property<java.lang.Integer> property, int amount)
           
static Property<java.lang.Long> div(Property<java.lang.Long> property, long amount)
           
static Property<java.math.BigDecimal> mult(Property<java.math.BigDecimal> property, java.math.BigDecimal amount)
           
static Property<java.lang.Double> mult(Property<java.lang.Double> property, double amount)
           
static Property<java.lang.Float> mult(Property<java.lang.Float> property, float amount)
           
static Property<java.lang.Integer> mult(Property<java.lang.Integer> property, int amount)
           
static Property<java.lang.Long> mult(Property<java.lang.Long> property, long amount)
           
static Property<java.math.BigDecimal> sub(Property<java.math.BigDecimal> property, java.math.BigDecimal amount)
           
static Property<java.lang.Double> sub(Property<java.lang.Double> property, double amount)
           
static Property<java.lang.Float> sub(Property<java.lang.Float> property, float amount)
           
static Property<java.lang.Integer> sub(Property<java.lang.Integer> property, int amount)
           
static Property<java.lang.Long> sub(Property<java.lang.Long> property, long amount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Numbers

public Numbers()
Method Detail

add

public static Property<java.lang.Integer> add(Property<java.lang.Integer> property,
                                              int amount)

mult

public static Property<java.lang.Integer> mult(Property<java.lang.Integer> property,
                                               int amount)

sub

public static Property<java.lang.Integer> sub(Property<java.lang.Integer> property,
                                              int amount)

div

public static Property<java.lang.Integer> div(Property<java.lang.Integer> property,
                                              int amount)

add

public static Property<java.lang.Long> add(Property<java.lang.Long> property,
                                           long amount)

mult

public static Property<java.lang.Long> mult(Property<java.lang.Long> property,
                                            long amount)

sub

public static Property<java.lang.Long> sub(Property<java.lang.Long> property,
                                           long amount)

div

public static Property<java.lang.Long> div(Property<java.lang.Long> property,
                                           long amount)

add

public static Property<java.lang.Double> add(Property<java.lang.Double> property,
                                             double amount)

mult

public static Property<java.lang.Double> mult(Property<java.lang.Double> property,
                                              double amount)

sub

public static Property<java.lang.Double> sub(Property<java.lang.Double> property,
                                             double amount)

div

public static Property<java.lang.Double> div(Property<java.lang.Double> property,
                                             double amount)

add

public static Property<java.lang.Float> add(Property<java.lang.Float> property,
                                            float amount)

mult

public static Property<java.lang.Float> mult(Property<java.lang.Float> property,
                                             float amount)

sub

public static Property<java.lang.Float> sub(Property<java.lang.Float> property,
                                            float amount)

div

public static Property<java.lang.Float> div(Property<java.lang.Float> property,
                                            float amount)

add

public static Property<java.math.BigDecimal> add(Property<java.math.BigDecimal> property,
                                                 java.math.BigDecimal amount)

mult

public static Property<java.math.BigDecimal> mult(Property<java.math.BigDecimal> property,
                                                  java.math.BigDecimal amount)

sub

public static Property<java.math.BigDecimal> sub(Property<java.math.BigDecimal> property,
                                                 java.math.BigDecimal amount)

div

public static Property<java.math.BigDecimal> div(Property<java.math.BigDecimal> property,
                                                 java.math.BigDecimal amount)