Home / Class/ IntStack Class — netty Architecture

IntStack Class — netty Architecture

Architecture documentation for the IntStack class in AdaptivePoolingAllocator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0bd78347_2d19_1813_07da_96176faf32d6["IntStack"]
  fee3fa6d_a7fb_30d6_ea34_49602c633a2c["AdaptivePoolingAllocator.java"]
  0bd78347_2d19_1813_07da_96176faf32d6 -->|defined in| fee3fa6d_a7fb_30d6_ea34_49602c633a2c
  ea2563c9_8bd1_4d3b_0cda_01e263708ce2["IntStack()"]
  0bd78347_2d19_1813_07da_96176faf32d6 -->|method| ea2563c9_8bd1_4d3b_0cda_01e263708ce2
  1fed9ab7_5a1d_51fc_3bb4_e5426c8fe9db["isEmpty()"]
  0bd78347_2d19_1813_07da_96176faf32d6 -->|method| 1fed9ab7_5a1d_51fc_3bb4_e5426c8fe9db
  790abbfa_ddb4_568c_92a2_77f827bf5498["pop()"]
  0bd78347_2d19_1813_07da_96176faf32d6 -->|method| 790abbfa_ddb4_568c_92a2_77f827bf5498
  d154e723_5f56_e12e_660c_4adeda4715dd["push()"]
  0bd78347_2d19_1813_07da_96176faf32d6 -->|method| d154e723_5f56_e12e_660c_4adeda4715dd
  41230d9d_3792_e2cb_6bf6_5576bee2a05f["size()"]
  0bd78347_2d19_1813_07da_96176faf32d6 -->|method| 41230d9d_3792_e2cb_6bf6_5576bee2a05f

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java lines 1222–1250

    private static final class IntStack {

        private final int[] stack;
        private int top;

        IntStack(int[] initialValues) {
            stack = initialValues;
            top = initialValues.length - 1;
        }

        public boolean isEmpty() {
            return top == -1;
        }

        public int pop() {
            final int last = stack[top];
            top--;
            return last;
        }

        public void push(int value) {
            stack[top + 1] = value;
            top++;
        }

        public int size() {
            return top + 1;
        }
    }

Frequently Asked Questions

What is the IntStack class?
IntStack is a class in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java.
Where is IntStack defined?
IntStack is defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java at line 1222.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free