Code example for LinkedList

Methods: size, toArray

0
    public Entry remove(int index) {
        return stack.remove(index);
    } 
 
    public Entry[] toArray() { 
        return stack.toArray(new Entry[stack.size()]);
    } 
 
    public static class Entry { 
        protected final Principal principal;
        protected final Object credential;
        protected final Subject subject;
 
        public Entry(Principal principal, Object credential, Subject subject) {
            this.principal = principal;
            this.credential = credential;
            this.subject = subject;
        } 
 
        public Principal getPrincipal() {
            return principal;