/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 Joseph Hendrix
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.svg.number;

/**
 * @author Joe Hendrix
 */
public class Percent<N extends Number & Comparable> extends Unit<N>
{
    public static final Percent<Double> FIFTY = new Percent<>(50.0);
    public static final Percent<Double> ONE_HUNDRED = new Percent<>(100.0);
    public static final Percent<Double> ZERO = new Percent<>(0.0);

    public Percent(N number)
    {
        super(number, "%");
    }

    @Override
    public Percent<Double> add(double d)
    {
        return new Percent<Double>(number.doubleValue() + d);
    }

    @Override
    public Percent<Integer> add(int i)
    {
        return new Percent<Integer>(number.intValue() + i);
    }

    @Override
    public Percent<Double> subtract(double d)
    {
        return new Percent<Double>(number.doubleValue() - d);
    }

    @Override
    public Percent<Integer> subtract(int i)
    {
        return new Percent<Integer>(number.intValue() - i);
    }

    @Override
    public Percent<Double> divide(double d)
    {
        return new Percent<Double>(number.doubleValue() / d);
    }

    @Override
    public Percent<Integer> divide(int i)
    {
        return new Percent<Integer>(number.intValue() / i);
    }
}

@@ -1454,11 +1454,280 @@
 );%0A    %7D
+%0A%0A    @Override    %0A    public Percent%3CDouble%3E multiply(double d)%0A    %7B%0A        return new Percent%3CDouble%3E(number.doubleValue() * d;%0A    %7D%0A%0A    @Override%0A    public Percent%3CInteger%3E multiply(int i)%0A    %7B%0A        return new Percent%3CInteger%3E(number.intValue() * i);%0A    %7D
 %0A%7D%0A

Update Percent.java