Added empty TenantCost
@@ -5,6 +5,7 @@ import com.yahoo.config.provision.TenantName;
import java.time.LocalDate;
import java.time.YearMonth;
+import java.util.Collections;
import java.util.List;
import java.util.Set;
@@ -16,4 +17,18 @@ public interface TenantCost {
Set<YearMonth> monthsWithMetering(TenantName tenantName);
List<CostInfo> getTenantCostOfMonth(TenantName tenantName, YearMonth month);
+
+ static TenantCost empty() {
+ return new TenantCost() {
+ @Override
+ public Set<YearMonth> monthsWithMetering(TenantName tenantName) {
+ return Collections.emptySet();
+ }
+
+ @Override
+ public List<CostInfo> getTenantCostOfMonth(TenantName tenantName, YearMonth month) {
+ return Collections.emptyList();
+ }
+ };
+ }
}
