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

Method push

chapter24/src/main/java/com/seaofnodes/simple/util/Ary.java:44–47  ·  view source on GitHub ↗

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

( E e )

Source from the content-addressed store, hash-verified

42 * @param e Element to add at end of list
43 **/
44 public E push( E e ) {
45 if( _len >= _es.length ) _es = Arrays.copyOf(_es,Math.max(1,_es.length<<1));
46 return (_es[_len++] = e);
47 }
48 /** @return remove and return last element */
49 public E pop( ) {
50 return _len==0 ? null : _es[--_len];

Callers 15

typeFunPtrMethod · 0.95
funcMethod · 0.95
functionCallMethod · 0.95
decUsersMethod · 0.45
doBuildCTFMethod · 0.45
markAliveMethod · 0.45
doMarkAliveMethod · 0.45
buildMethod · 0.45
parseMethod · 0.45
parseFunctionBodyMethod · 0.45
parseBlockMethod · 0.45
parseForMethod · 0.45

Calls

no outgoing calls

Tested by 5

decUsersMethod · 0.36
doBuildCTFMethod · 0.36
markAliveMethod · 0.36
doMarkAliveMethod · 0.36
buildMethod · 0.36