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

com.github.gv2011.accounting2.AccountingEntry Maven / Gradle / Ivy

package com.github.gv2011.accounting2;

import java.time.LocalDate;

import com.github.gv2011.util.icol.Opt;

public interface AccountingEntry {

  Amount amount();

  default Amount balance(){
    return entryBefore().map(AccountingEntry::balance).orElse(Amount.ZERO).add(amount());
  }

  String opposite();

  String message();

  Opt entryBefore();

  LocalDate date();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy