Search in sources :

Example 1 with FloatProperty

use of com.xpn.xwiki.objects.FloatProperty in project xwiki-platform by xwiki.

the class NumberClass method newProperty.

@Override
public BaseProperty newProperty() {
    String ntype = getNumberType();
    BaseProperty property;
    if (ntype.equals("integer")) {
        property = new IntegerProperty();
    } else if (ntype.equals("float")) {
        property = new FloatProperty();
    } else if (ntype.equals("double")) {
        property = new DoubleProperty();
    } else {
        property = new LongProperty();
    }
    property.setName(getName());
    return property;
}
Also used : IntegerProperty(com.xpn.xwiki.objects.IntegerProperty) LongProperty(com.xpn.xwiki.objects.LongProperty) BaseProperty(com.xpn.xwiki.objects.BaseProperty) FloatProperty(com.xpn.xwiki.objects.FloatProperty) DoubleProperty(com.xpn.xwiki.objects.DoubleProperty)

Aggregations

BaseProperty (com.xpn.xwiki.objects.BaseProperty)1 DoubleProperty (com.xpn.xwiki.objects.DoubleProperty)1 FloatProperty (com.xpn.xwiki.objects.FloatProperty)1 IntegerProperty (com.xpn.xwiki.objects.IntegerProperty)1 LongProperty (com.xpn.xwiki.objects.LongProperty)1