All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tecacet.finance.model.Split Maven / Gradle / Ivy

Go to download

JFApi connects to various Web Services that provide financial data such as stock prices, splits, dividends, and FX rates.

There is a newer version: 1.1.3
Show newest version
package com.tecacet.finance.model;

import java.time.LocalDate;

public class Split {

    private final LocalDate date;
    private final int numerator;
    private final int denominator;

    public Split(LocalDate date, int numerator, int denominator) {
        super();
        this.date = date;
        this.numerator = numerator;
        this.denominator = denominator;
    }

    public LocalDate getDate() {
        return date;
    }

    public int getNumerator() {
        return numerator;
    }

    public int getDenominator() {
        return denominator;
    }

    public boolean isReverse() {
        return numerator > denominator;
    }

    @Override
    public String toString() {
        return String.format("%d:%d on %s", denominator, numerator, date);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy