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

Method string

basex-core/src/main/java/org/basex/query/value/item/DTDur.java:144–154  ·  view source on GitHub ↗
(final InputInfo ii)

Source from the content-addressed store, hash-verified

142 }
143
144 @Override
145 public byte[] string(final InputInfo ii) {
146 final TokenBuilder tb = new TokenBuilder();
147 final int ss = seconds.signum();
148 if(ss < 0) tb.add('-');
149 tb.add('P');
150 if(day() != 0) { tb.addLong(Math.abs(day())); tb.add('D'); }
151 time(tb);
152 if(ss == 0) tb.add("T0S");
153 return tb.finish();
154 }
155
156 @Override
157 public int compare(final Item item, final Collation coll, final boolean transitive,

Callers 1

writeMethod · 0.95

Calls 6

addMethod · 0.95
addLongMethod · 0.95
finishMethod · 0.95
dayMethod · 0.45
absMethod · 0.45
timeMethod · 0.45

Tested by

no test coverage detected