MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / add

Method add

chapter18/src/main/java/com/seaofnodes/simple/Ary.java:54–58  ·  view source on GitHub ↗

Add element in amortized constant time @param e Element to add at end of list @return true

( E e )

Source from the content-addressed store, hash-verified

52 * @param e Element to add at end of list
53 * @return true */
54 public boolean add( E e ) {
55 if( _len >= _es.length ) _es = Arrays.copyOf(_es,Math.max(1,_es.length<<1));
56 _es[_len++] = e;
57 return true;
58 }
59
60 /** Fast, constant-time, element removal. Does not preserve order
61 * @param i element to be removed

Callers 15

_prettyPrintScheduledMethod · 0.95
addAllMethod · 0.95
evaluateMethod · 0.45
doScheduleMethod · 0.45
doBuildCTFMethod · 0.45
buildMethod · 0.45
ScriptGeneratorClass · 0.45
addVariableMethod · 0.45
getTypeMethod · 0.45
genStructMethod · 0.45
recordExceptionMethod · 0.45
_rpo_cfgMethod · 0.45

Calls

no outgoing calls

Tested by 8

evaluateMethod · 0.36
doScheduleMethod · 0.36
doBuildCTFMethod · 0.36
buildMethod · 0.36
addVariableMethod · 0.36
getTypeMethod · 0.36
genStructMethod · 0.36
recordExceptionMethod · 0.36