MCPcopy Create free account
hub / github.com/ccxt/ccxt / concat

Method concat

java/lib/src/main/java/io/github/ccxt/Helpers.java:811–832  ·  view source on GitHub ↗
(Object a, Object b)

Source from the content-addressed store, hash-verified

809 }
810
811 public static Object concat(Object a, Object b) {
812 if (a == null && b == null) return null;
813 if (a == null) return b;
814 if (b == null) return a;
815
816 if (a instanceof List && b instanceof List) {
817 List result = new ArrayList((List) a);
818 result.addAll((List) b);
819 return result;
820 } else if (a instanceof List && !(b instanceof List)) {
821 List result = new ArrayList((List) a);
822 result.add(b);
823 return result;
824 } else if (!(a instanceof List) && b instanceof List) {
825 List result = new ArrayList();
826 result.add(a);
827 result.addAll((List) b);
828 return result;
829 } else {
830 throw new IllegalStateException("Unsupported types for concatenation.");
831 }
832 }
833
834 // --------- helpers ---------
835

Callers 15

testExchangeFunction · 0.45
ondataFunction · 0.45
toBufferFunction · 0.45
decodeShortStringFunction · 0.45
useDecodedFunction · 0.45
compileMethod · 0.45
extractCairo0TupleFunction · 0.45
parseCalldataValueFunction · 0.45
_encodeFunction · 0.45
parseObjectFunction · 0.45
mergeFunction · 0.45
combineFunction · 0.45

Calls 1

addMethod · 0.45

Tested by

no test coverage detected