MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / size

Method size

src/main/java/com/thealgorithms/datastructures/bags/Bag.java:49–51  ·  view source on GitHub ↗

Returns the number of elements in the bag. @return the number of elements currently in the bag

()

Source from the content-addressed store, hash-verified

47 * @return the number of elements currently in the bag
48 */
49 public int size() {
50 return size;
51 }
52
53 /**
54 * Adds an element to the bag.

Callers 7

testBagOperationsMethod · 0.95
testBagInitializationMethod · 0.95
testAddElementsMethod · 0.95

Calls

no outgoing calls

Tested by 7

testBagOperationsMethod · 0.76
testBagInitializationMethod · 0.76
testAddElementsMethod · 0.76