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

Method push

chapter21/src/main/java/com/seaofnodes/simple/Ary.java:43–46  ·  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

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

Callers 15

parseStructMethod · 0.95
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

Calls

no outgoing calls

Tested by 5

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