MCPcopy Index your code
hub / github.com/ccxt/ccxt / objectKeys

Method objectKeys

java/lib/src/main/java/io/github/ccxt/Helpers.java:955–962  ·  view source on GitHub ↗

Snapshot-copy of a Map's keys under the map's intrinsic lock, so concurrent put/remove from a WS-handler thread doesn't IOOBE the iteration. Used by the transpile of `Object.keys(x)` — see post-process in build/javaTranspiler.ts. For non-Map targets returns an empty list (matches JS Object.keys on n

(Object target)

Source from the content-addressed store, hash-verified

953 * For non-Map targets returns an empty list (matches JS Object.keys on non-objects).
954 */
955 public static List<Object> objectKeys(Object target) {
956 if (target instanceof Map<?, ?> m) {
957 synchronized (m) {
958 return new ArrayList<>(m.keySet());
959 }
960 }
961 return new ArrayList<>();
962 }
963
964 /** Same as {@link #objectKeys} but for values — transpile of `Object.values(x)`. */
965 public static List<Object> objectValues(Object target) {

Callers 15

findTimeframeMethod · 0.95
findMessageHashesMethod · 0.95
featuresMapperMethod · 0.95
safeCurrencyStructureMethod · 0.95
setMarketsMethod · 0.95
safeBalanceMethod · 0.95
parseOrdersMethod · 0.95
addKeyInArrayItemsMethod · 0.95
networkCodeToIdMethod · 0.95

Calls

no outgoing calls

Tested by 15

testFetchOrderBooksMethod · 0.76
testLoadMarketsMethod · 0.76
testFetchOHLCVMethod · 0.76
testCurrencyMethod · 0.76
testMarketMethod · 0.76
testBalanceMethod · 0.76
testFeaturesMethod · 0.76
testFeaturesInnerMethod · 0.76
AssertStructureMethod · 0.76
testOptionsNetworksMethod · 0.76
initInnerMethod · 0.76