Code example for Stack

Methods: empty, peek

0
 
        public static JAASRole peek () 
        { 
            Stack s = (Stack)local.get();
             
            if ((s == null) || (s.empty()))
                return null; 
             
             
            return (JAASRole)s.peek();
        } 
         
        public static void clear () 
        { 
            Stack s = (Stack)local.get();
 
            if ((s == null) || (s.empty()))
                return; 
 
            s.clear();
        }