Package java.util

Examples of java.util.Stack.peek()


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


            if (dist <= tolerance) {
                // Debug.output("Skipping duplicate geo");
                continue;
            }

            endGeo = (Geo) hullStack.peek();

            midCross = endGeo.crossNormalize(midGeo);
            gCross = midGeo.crossNormalize(geo);
            Geo i = gCross.crossNormalize(midCross).antipode();
View Full Code Here

                while (hullStack.size() > 1) {

                    // Debug.output("-------- midGeo dropped");

                    midGeo = (Geo) hullStack.pop();
                    endGeo = (Geo) hullStack.peek();

                    midCross = endGeo.crossNormalize(midGeo);
                    gCross = midGeo.crossNormalize(geo);
                    i = gCross.crossNormalize(midCross).antipode();
View Full Code Here

          case Yytoken.TYPE_COLON:
            break;
          case Yytoken.TYPE_VALUE:
            statusStack.pop();
            String key=(String)valueStack.pop();
            JSONObject parent=(JSONObject)valueStack.peek();
            parent.put(key,token.value);
            status=peekStatus(statusStack);
            break;
          case Yytoken.TYPE_LEFT_SQUARE:
            statusStack.pop();
View Full Code Here

            status=peekStatus(statusStack);
            break;
          case Yytoken.TYPE_LEFT_SQUARE:
            statusStack.pop();
            key=(String)valueStack.pop();
            parent=(JSONObject)valueStack.peek();
            JSONArray newArray=new JSONArray();
            parent.put(key,newArray);
            status=S_IN_ARRAY;
            statusStack.push(new Integer(status));
            valueStack.push(newArray);
View Full Code Here

            valueStack.push(newArray);
            break;
          case Yytoken.TYPE_LEFT_BRACE:
            statusStack.pop();
            key=(String)valueStack.pop();
            parent=(JSONObject)valueStack.peek();
            JSONObject newObject=new JSONObject();
            parent.put(key,newObject);
            status=S_IN_OBJECT;
            statusStack.push(new Integer(status));
            valueStack.push(newObject);
View Full Code Here

        case S_IN_ARRAY:
          switch(token.type){
          case Yytoken.TYPE_COMMA:
            break;
          case Yytoken.TYPE_VALUE:
            JSONArray val=(JSONArray)valueStack.peek();
            val.add(token.value);
            break;
          case Yytoken.TYPE_RIGHT_SQUARE:
            if(valueStack.size()>1){
              statusStack.pop();
View Full Code Here

            else{
              status=S_IN_FINISHED_VALUE;
            }
            break;
          case Yytoken.TYPE_LEFT_BRACE:
            val=(JSONArray)valueStack.peek();
            JSONObject newObject=new JSONObject();
            val.add(newObject);
            status=S_IN_OBJECT;
            statusStack.push(new Integer(status));
            valueStack.push(newObject);
View Full Code Here

            status=S_IN_OBJECT;
            statusStack.push(new Integer(status));
            valueStack.push(newObject);
            break;
          case Yytoken.TYPE_LEFT_SQUARE:
            val=(JSONArray)valueStack.peek();
            JSONArray newArray=new JSONArray();
            val.add(newArray);
            status=S_IN_ARRAY;
            statusStack.push(new Integer(status));
            valueStack.push(newArray);
View Full Code Here

          next = null;
        }
      }

      next = (TreeNode)stack.pop();
      previous = stack.isEmpty() ? null : (ProductionNode)stack.peek();

      if (locatorImpl!=null)
      {
        locatorImpl.setLineNumber(next.linenumber);
        locatorImpl.setColumnNumber(next.columnnumber);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.