Examples of peek()


Examples of java.util.LinkedList.peek()

   
    List<PDGNode> processed = new ArrayList<PDGNode>();
    Queue nodes = new LinkedList();
    nodes.offer(this.m_startNode);
   
    while(nodes.peek() != null)
    {
      PDGNode node = (PDGNode) nodes.remove();
      processed.add(node);
     
      s += "\n Begin PDGNode: " + node;
View Full Code Here

Examples of java.util.Queue.peek()

   
    List<PDGNode> processed = new ArrayList<PDGNode>();
    Queue nodes = new LinkedList();
    nodes.offer(this.m_startNode);
   
    while(nodes.peek() != null)
    {
      PDGNode node = (PDGNode) nodes.remove();
      processed.add(node);
     
      s += "\n Begin PDGNode: " + node;
View Full Code Here

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

Examples of java.util.concurrent.BlockingQueue.peek()

     */
    @Test
    public void testPeek() {
        BlockingQueue q = populatedQueue(SIZE);
        for (int i = 0; i < SIZE; ++i) {
            assertEquals(i, q.peek());
            assertEquals(i, q.poll());
            assertTrue(q.peek() == null ||
                    !q.peek().equals(i));
        }
        assertNull(q.peek());
View Full Code Here

Examples of javassist.bytecode.analysis.Frame.peek()

    private String getTopType(int pos) throws BadBytecode {
        Frame frame = getFrame(pos);
        if (frame == null)
            return null;

        CtClass clazz = frame.peek().getCtClass();
        return clazz != null ? Descriptor.toJvmName(clazz) : null;
    }

    private int replace(ConstPool cp, CodeIterator iterator, int pos,
            int opcode, String signature) throws BadBytecode {
View Full Code Here

Examples of javax.cache.Cache.peek()

            if ("get".equals(op)) {
                display(key, cache.get(key));
            } else if ("getCacheEntry".equals(op)) {
                display(key, cache.getCacheEntry(key));
            } else if ("peek".equals(op)) {
                display(key, cache.peek(key));
            } else if ("remove".equals(op)) {
                display(key, cache.remove(key));
            } else if ("size".equals(op)) {
                display("Size: ", cache.size());
            }
View Full Code Here

Examples of javax.xml.stream.XMLEventReader.peek()

      ThreddsBuilderFactory catBuilderFac = new ThreddsBuilderFactoryImpl();
      ThreddsBuilder threddsBuilder = null;
      while ( eventReader.hasNext() )
      {
        XMLEvent event = eventReader.peek();
        if ( event.isEndDocument())
        { // Done!
          eventReader.next();
          break;
        }
View Full Code Here

Examples of jsonij.json.JSONReader.JSONStringReader.peek()

                        int unicodeInt = Integer.parseInt(unicodeString.toUpperCase(), 16);
                        if (Character.isHighSurrogate((char) unicodeInt)) {
                            String highSurrogateString = unicodeString;
                            int highSurrogate = unicodeInt;
                            unicodeString = "";
                            if (targetString.peek() == REVERSE_SOLIDUS) {
                                targetString.read();
                            } else {
                                throw new JSONParserException("invalidStringMissingSurrogate", target.getLineNumber(), target.getPositionNumber(), REVERSE_SOLIDUS, targetString.peek());
                            }
                            if (targetString.peek() == HEX_CHAR) {
View Full Code Here

Examples of jsonij.parser.ReaderParser.peek()

                        break;
                    default:
                        throw new JSONParserException("invalidStringEscape", target.getLineNumber(), target.getPositionNumber(), targetString.peek());
                }
            } else {
                if (ConstantUtility.isValidStringChar(targetString.peek())) {
                    valueStringBuilder.append((char) targetString.read());
                } else {
                    throw new JSONParserException("invalidStringValue", target.getLineNumber(), target.getPositionNumber(), (char) targetString.peek());
                }
            }
View Full Code Here

Examples of mf.javax.xml.stream.XMLEventReader.peek()

                if (!isDocument) {
                    if (streamReader != null) {
                        isDocument = (streamReader.getEventType() == XMLStreamReader.START_DOCUMENT);
                    }
                    else {
                        isDocument = eventReader.peek().isStartDocument();
                    }
                }
                if (isDocument) {
                    key = new XSDKey(schemaId, referType, schemaNamespace);
                    if ((schemaElement = (Element) fTraversed.get(key)) != null) {
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.