@Test void buildShouldThrowOnMissingUsedValue() { assertThatThrownBy( () -> Quota.<QuotaCountLimit, QuotaCountUsage>builder().computedLimit(QuotaCountLimit.count(1)).build()) .isInstanceOf(IllegalStateException.class); }
public static <T extends QuotaLimitValue<T>, U extends QuotaUsageValue<U, T>> Builder<T, U> builder() { return new Builder<>(); }
Quota { public static <T extends QuotaLimitValue<T>, U extends QuotaUsageValue<U, T>> Builder<T, U> builder() { return new Builder<>(); } }
Quota { public static <T extends QuotaLimitValue<T>, U extends QuotaUsageValue<U, T>> Builder<T, U> builder() { return new Builder<>(); } private  Quota(U used, T max, ImmutableMap<Scope, T> limitByScope); }
Quota { public static <T extends QuotaLimitValue<T>, U extends QuotaUsageValue<U, T>> Builder<T, U> builder() { return new Builder<>(); } private  Quota(U used, T max, ImmutableMap<Scope, T> limitByScope); static List<Scope> allScopes(); static Builder<T, U> builder(); T getLimit(); U getUsed(); double getRatio(); ImmutableMap<Scope, T> getLimitByScope(); Quota<T, U> addValueToQuota(U value); boolean isOverQuota(); boolean isOverQuotaWithAdditionalValue(long additionalValue); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
Quota { public static <T extends QuotaLimitValue<T>, U extends QuotaUsageValue<U, T>> Builder<T, U> builder() { return new Builder<>(); } private  Quota(U used, T max, ImmutableMap<Scope, T> limitByScope); static List<Scope> allScopes(); static Builder<T, U> builder(); T getLimit(); U getUsed(); double getRatio(); ImmutableMap<Scope, T> getLimitByScope(); Quota<T, U> addValueToQuota(U value); boolean isOverQuota(); boolean isOverQuotaWithAdditionalValue(long additionalValue); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }