Package java.util

Examples of java.util.List.lastIndexOf()


      {
         lock.readLock().acquire();
         try
         {
            List state = getCurrentState(false);
            return state.lastIndexOf(o);
         }
         finally
         {
            lock.readLock().release();
         }
View Full Code Here


   */
  public static void popLockedContextForCurrentThread(EOEditingContext ec) {
    if (useUnlocker() && ec != null) {
      List ecs = locks.get();
      if (ecs != null) {
        int index = ecs.lastIndexOf(ec);
        if (index >= 0) {
          ecs.remove(index);
        }
        else {
          log.error("Should pop, but ec not found in Vector! " + Thread.currentThread().getName() + ", ec: " + ec + ", ecs:" + ecs);
View Full Code Here

/*     */     {
/* 518 */       this.lock.readLock().acquire();
/*     */       try
/*     */       {
/* 521 */         List state = getCurrentState(false);
/* 522 */         int i = state.lastIndexOf(o);
/*     */         return i; } finally { this.lock.readLock().release(); }
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/*     */     }
View Full Code Here

        int index = -1;

        List dataList = (List) dataCollection;
        if (dataList != null && !dataList.isEmpty())
        {
            index = dataList.lastIndexOf(arg0);
        }
        return index;
    }

    @Override
View Full Code Here

        list.add("Bye");
        assert list.contains("Bye");
        assert 0 == list.indexOf("Bye");

        list.add(1, "Groovy");
        assert 1 == list.lastIndexOf("Groovy");
    }
}
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.