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

Method addUnique

basex-core/src/main/java/org/basex/util/list/IntList.java:124–127  ·  view source on GitHub ↗

Adds an element to the array if it is not contained yet. @param element element to be added @return result of check

(final int element)

Source from the content-addressed store, hash-verified

122 * @return result of check
123 */
124 public IntList addUnique(final int element) {
125 if(!contains(element)) add(element);
126 return this;
127 }
128
129 /**
130 * Inserts elements at the specified index position.

Callers 9

gh1839Method · 0.45
gh1852Method · 0.45
addMethod · 0.45
addMethod · 0.45
completeMethod · 0.45
simplifyForMethod · 0.45
transformMethod · 0.45
setFilesMethod · 0.45
refreshHistoryMethod · 0.45

Calls 2

containsMethod · 0.95
addMethod · 0.95

Tested by 2

gh1839Method · 0.36
gh1852Method · 0.36