Class InMemoryProject
- java.lang.Object
-
- it.tidalwave.accounting.model.impl.InMemoryProject
-
- All Implemented Interfaces:
Project
,ProjectSpi
,it.tidalwave.role.Composite<JobEvent,it.tidalwave.util.Finder<JobEvent>>
,it.tidalwave.role.Identifiable
,it.tidalwave.role.SimpleComposite<JobEvent>
,it.tidalwave.util.As
@Immutable public class InMemoryProject extends java.lang.Object implements ProjectSpi
This class models a project.- Author:
- Fabrizio Giudici
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface it.tidalwave.util.As
it.tidalwave.util.As.Type<T extends java.lang.Object>
-
Nested classes/interfaces inherited from interface it.tidalwave.role.Composite
it.tidalwave.role.Composite.Visitor<T extends java.lang.Object,R extends java.lang.Object>
-
Nested classes/interfaces inherited from interface it.tidalwave.accounting.model.Project
Project.Builder, Project.Status
-
-
Constructor Summary
Constructors Constructor Description InMemoryProject(Project.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectRegistry.JobEventFinder
findChildren()
java.time.Duration
getDuration()
Money
getEarnings()
Money
getInvoicedEarnings()
Project.Builder
toBuilder()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.tidalwave.accounting.model.Project
getCustomer
-
Methods inherited from interface it.tidalwave.accounting.model.spi.ProjectSpi
getBudget, getEndDate, getHourlyRate, getName, getNotes, getNumber, getStartDate, getStatus
-
-
-
-
Constructor Detail
-
InMemoryProject
public InMemoryProject(@Nonnull Project.Builder builder)
-
-
Method Detail
-
findChildren
@Nonnull public ProjectRegistry.JobEventFinder findChildren()
- Specified by:
findChildren
in interfaceit.tidalwave.role.Composite<JobEvent,it.tidalwave.util.Finder<JobEvent>>
- Specified by:
findChildren
in interfaceProject
-
getEarnings
@Nonnull public Money getEarnings()
- Specified by:
getEarnings
in interfaceProjectSpi
-
getDuration
@Nonnull public java.time.Duration getDuration()
- Specified by:
getDuration
in interfaceProjectSpi
-
getInvoicedEarnings
@Nonnull public Money getInvoicedEarnings()
- Specified by:
getInvoicedEarnings
in interfaceProjectSpi
-
toBuilder
@Nonnull public Project.Builder toBuilder()
-
-