Package java.util

Examples of java.util.ArrayDeque$ReverseArrayDequeIterator


        if (target.isEmpty()) {
            return target;
        }

        Collection<EventBean> beans = (Collection<EventBean>) target;
        Deque queue = new ArrayDeque();
        for (EventBean next : beans) {
            eventsLambda[streamNumLambda] = next;

            Object item = innerExpression.evaluate(eventsLambda, isNewData, context);
            if (item != null) {
                queue.add(item);
            }
        }

        return queue;
    }
View Full Code Here


    public Collections() {
        list = new ArrayList();
        set = new HashSet();
        mapAnimalById = new HashMap();
        mapDogByName = new HashMap();
        queue = new ArrayDeque();
        listOfDogs = new ArrayList();
    }
View Full Code Here

                        }
                        case ID_CC_STACK: {
                            return replace(readCollectionData(unshared, -1, len, new Stack(), discardMissing));
                        }
                        case ID_CC_ARRAY_DEQUE: {
                            return replace(readCollectionData(unshared, -1, len, new ArrayDeque(len), discardMissing));
                        }

                        case ID_CC_HASH_MAP: {
                            return replace(readMapData(unshared, -1, len, new HashMap(len), discardMissing));
                        }
View Full Code Here

  protected Object evaluate(final Object[] iParams, final OCommandContext iContext, final String iClassName) {
    final int beginIndex = (Integer) iParams[0];
    final int items = iParams.length > 1 ? (Integer) iParams[1] : 1;

    final ArrayDeque stack = (ArrayDeque) iContext.getVariable("stack");
    if (stack == null)
      throw new OCommandExecutionException("Cannot invoke " + getName() + "() against non traverse command");

    final List<OIdentifiable> result = items > 1 ? new ArrayList<OIdentifiable>(items) : null;

    if (beginIndex < 0) {
      int i = -1;
      for (Iterator it = stack.iterator(); it.hasNext();) {
        final Object o = it.next();
        if (o instanceof OTraverseRecordProcess) {
          final ODocument record = ((OTraverseRecordProcess) o).getTarget();

          if (iClassName == null || record.getSchemaClass().isSubClassOf(iClassName)) {
            if (i <= beginIndex) {
              if (items == 1)
                return record;
              else {
                result.add(record);
                if (result.size() >= items)
                  break;
              }
            }
            i--;
          }
        }
      }
    } else {
      int i = 0;
      for (Iterator it = stack.descendingIterator(); it.hasNext();) {
        final Object o = it.next();
        if (o instanceof OTraverseRecordProcess) {
          final ODocument record = ((OTraverseRecordProcess) o).getTarget();

          if (iClassName == null || record.getSchemaClass().isSubClassOf(iClassName)) {
View Full Code Here

    });
      }
            bc.classLoaderSwitched = true;
        }

        ArrayDeque beanContextStack =
            (ArrayDeque) threadLocalContext.get();
               
        if ( beanContextStack == null ) {
            beanContextStack = new ArrayDeque();
            threadLocalContext.set(beanContextStack);
        }
        beanContextStack.push(bc);
    }
View Full Code Here

        beanContextStack.push(bc);
    }

    public void externalPostInvoke() {
        try {
          ArrayDeque beanContextStack =
                (ArrayDeque) threadLocalContext.get();
           
            final BeanContext bc = (BeanContext) beanContextStack.pop();
            if ( bc.classLoaderSwitched == true ) {
              if (System.getSecurityManager() == null) {
                Thread.currentThread().setContextClassLoader(bc.previousClassLoader);
            } else {
                java.security.AccessController.doPrivileged(
View Full Code Here

    });
      }
            bc.classLoaderSwitched = true;
        }

        ArrayDeque beanContextStack =
            (ArrayDeque) threadLocalContext.get();
               
        if ( beanContextStack == null ) {
            beanContextStack = new ArrayDeque();
            threadLocalContext.set(beanContextStack);
        }
        beanContextStack.push(bc);
    }
View Full Code Here

        beanContextStack.push(bc);
    }

    public void externalPostInvoke() {
        try {
          ArrayDeque beanContextStack =
                (ArrayDeque) threadLocalContext.get();
           
            final BeanContext bc = (BeanContext) beanContextStack.pop();
            if ( bc.classLoaderSwitched == true ) {
              if (System.getSecurityManager() == null) {
                Thread.currentThread().setContextClassLoader(bc.previousClassLoader);
            } else {
                java.security.AccessController.doPrivileged(
View Full Code Here

        for (int i = 0; i < playerCount; i++) {
            _field.addPlayer(_startCell,
                    new Player("Игрок " + (i + 1),
                    _availableColors.get(i), 150000));
        }
        _playersQueue = new ArrayDeque(_field.players());
       
        GameModelEvent event = new GameModelEvent(this);
        this.fireGameStarted(event);
    }
View Full Code Here

    });
      }
            bc.classLoaderSwitched = true;
        }

        ArrayDeque beanContextStack =
            (ArrayDeque) threadLocalContext.get();
               
        if ( beanContextStack == null ) {
            beanContextStack = new ArrayDeque();
            threadLocalContext.set(beanContextStack);
        }
        beanContextStack.push(bc);
    }
View Full Code Here

TOP

Related Classes of java.util.ArrayDeque$ReverseArrayDequeIterator

Copyright © 2018 www.massapicom. 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.