Package java.util

Examples of java.util.List.subList()


        idx    = -(idx + 1);
      } else {
        idx    = getLeftMostIndex( collResult, idx, false );
      }
//long t6 = System.currentTimeMillis();
      collResult  = collResult.subList( idx, collResult.size() );
//long t7 = System.currentTimeMillis();
//System.out.println( "editGetRange " + (t2-t1) + " / " + (t3-t2) + " / " + (t4-t3) + " / " + (t5-t4) + " / " + (t6-t5) + " / " + (t7-t6) );
    }

    return collResult;
View Full Code Here


  }

  public List getAll( int startIdx, int stopIdx, boolean byStart )
  {
    final List coll = byStart ? collStakesByStart : collStakesByStop;
    return new ArrayList( coll.subList( startIdx, stopIdx ));
  }
 
  public void add( Object source, Stake stake )
  throws IOException
  {
View Full Code Here

            int startIndex = serverMetadata.getFetchStartIndex();
            int endIndex = startIndex + serverMetadata.getFetchLimit();

            // send back just one page... query sender will figure out where it fits in
            // the incremental list
            this.response = new ListResponse(new ArrayList<Object>(cachedList.subList(
                    startIndex,
                    endIndex)));

            return DONE;
        }
View Full Code Here

         Collections.sort(uf, new UserEntryComparator());

         if (offset + limit <= size)
         {
            return processUsers(uf.subList(offset, offset + limit));
         }
         else if (offset >= size)
         {
            return new HashSet();
         }
View Full Code Here

         else if (offset >= size)
         {
            return new HashSet();
         }

         return processUsers(uf.subList(offset, size));
      }
      catch (NoSuchElementException e)
      {
         log.debug("No users found", e);
      }
View Full Code Here

                    ElementMetaData property = metaData.findElement(sortParam.getProperty());
                    Collections.sort(list, new PropertyComparator(property, sortParam.isAscending()));
                }
            }

            return list.subList(first, first + count).iterator();
        }

        public int size()
        {
            Collection collection = (Collection)listModel.getObject();
View Full Code Here

            // We start at an offset of 1 because the entire column
            // list is generally implicitly indexed by the fact that
            // it's a primary key.
            for (int i = 1; i < size; i++)
            {
                addIndex(new Index(this, pk.subList(i, size)));
            }
        }
        catch (EngineException e)
        {
            log.error(e, e);
View Full Code Here

     * @return the sub-list
     * @see java.util.List#subList(int, int)
     */
    public List subList(int fromIndex, int toIndex) {
        List list = (List) m_dependency.getService();
        return list.subList(fromIndex, toIndex);
    }

    /**
     * Iterator on a set of service objects.
     * This iterator iterates on a cached copy of service objects.
View Full Code Here

      try {
        try {
          ps = session.getBatcher().prepareStatement( idInsertSelect );
          int parameterStart = getWalker().getNumberOfParametersInSetClause();
          List allParams = getWalker().getParameters();
          Iterator whereParams = allParams.subList( parameterStart, allParams.size() ).iterator();
          int sum = 1; // jdbc params are 1-based
          while ( whereParams.hasNext() ) {
            sum += ( ( ParameterSpecification ) whereParams.next() ).bind( ps, parameters, session, sum );
          }
          resultCount = ps.executeUpdate();
View Full Code Here

      try {
        try {
          ps = session.getBatcher().prepareStatement( idInsertSelect );
          int parameterStart = getWalker().getNumberOfParametersInSetClause();
          List allParams = getWalker().getParameters();
          Iterator whereParams = allParams.subList( parameterStart, allParams.size() ).iterator();
          int sum = 1; // jdbc params are 1-based
          while ( whereParams.hasNext() ) {
            sum += ( ( ParameterSpecification ) whereParams.next() ).bind( ps, parameters, session, sum );
          }
          resultCount = ps.executeUpdate();
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.