Created
March 29, 2022 08:35
-
-
Save Hkazanci93/d098caf836f00690ec646ba47850f754 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String balance_ts_key = BALANCE_TS + principal.getName(); | |
Map<String, String> tsValues = tsc.range(balance_ts_key, System.currentTimeMillis() - (1000 * 60 * 60 * 24 * 7), | |
System.currentTimeMillis()); | |
Balance[] balanceTs = new Balance[tsValues.size()]; | |
int i = 0; | |
for (Entry<String, String> entry : tsValues.entrySet()) { | |
Object keyString = entry.getKey(); | |
Object valueString = entry.getValue(); | |
balanceTs[i] = new Balance(keyString, valueString); | |
i++; | |
} | |
return balanceTs; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment