MCPcopy Create free account
hub / github.com/BaseXdb/basex / toJava

Method toJava

basex-core/src/main/java/org/basex/query/value/seq/IntSeq.java:129–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 }
128
129 @Override
130 public Object toJava() {
131 switch((BasicType) type) {
132 case BYTE:
133 final ByteList bl = new ByteList((int) size);
134 for(final int value : values) bl.add((byte) value);
135 return bl.finish();
136 case SHORT:
137 case UNSIGNED_BYTE:
138 final ShortList sl = new ShortList((int) size);
139 for(final int value : values) sl.add((short) value);
140 return sl.finish();
141 case UNSIGNED_SHORT:
142 final char[] chars = new char[(int) size];
143 int c = 0;
144 for(final int value : values) chars[c++] = (char) value;
145 return chars;
146 case INT:
147 return values;
148 default:
149 final LongList il = new LongList((int) size);
150 for(final int value : values) il.add(value);
151 return il.finish();
152 }
153 }
154
155 @Override
156 public boolean equals(final Object obj) {

Callers

nothing calls this directly

Calls 6

addMethod · 0.95
finishMethod · 0.95
addMethod · 0.95
finishMethod · 0.95
addMethod · 0.95
finishMethod · 0.95

Tested by

no test coverage detected