Package java.util

Examples of java.util.List.indexOf()


         
        }
        else if(htmlTag == Tag.LI)
        {
         
          whitespaces[i] = whitespaces[elements.indexOf(parent)];
          if(element.getElement(0) != null &&
              (element.getElement(0).getName().toLowerCase().equals("ol") || element.getElement(0).getName().toLowerCase().equals("ul"))
              )
          {
            chunk = "";
View Full Code Here


          {
            chunk = "";
          }
          else if(parent.getName().equals("ol"))
          {
            int index = elements.indexOf(parent);
            chunk = whitespaces[index] + String.valueOf(++orderedListIndex[index]) + ".  ";
          }
          else
          {
            chunk = whitespaces[elements.indexOf(parent)] + "\u2022  ";
View Full Code Here

            int index = elements.indexOf(parent);
            chunk = whitespaces[index] + String.valueOf(++orderedListIndex[index]) + ".  ";
          }
          else
          {
            chunk = whitespaces[elements.indexOf(parent)] + "\u2022  ";
          }
          crtOffset += chunk.length();
        }
        else if (element instanceof LeafElement)
        {
View Full Code Here

    ownerSurrogate = as;
    crosscutClassName = crsc.getClass().getName();
    try {
      List crosscuts  = crsc.getOwner().getCrosscuts();
      index = crosscuts.indexOf(crsc);
    }
    catch (NullPointerException e) {
      index = -1;
    }
    initialToString = crsc.toString();
View Full Code Here

  public void withdraw(AspectSurrogate ext,Object txId) throws RemoteException,ClassNotFoundException {
    init();
    Aspect asp = qMgr.reconstructAspect(ext);

    List x = new Vector((extMgr.getAllAspects()));
    int extIndx = x.indexOf(asp);
    if (extIndx >= 0) {
      if (txId == null) {
        extMgr.withdraw((Aspect)(x.get(extIndx)));
      }
      else
View Full Code Here

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

                                              org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)
      throws DOMException {
    if (node instanceof Branch) {
      Branch branch = (Branch) node;
      List list = branch.content();
      int index = list.indexOf(refChild);

      if (index < 0) {
        branch.add((Node) newChild);
      } else {
        list.add(index, newChild);
View Full Code Here

                                              org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)
      throws DOMException {
    if (node instanceof Branch) {
      Branch branch = (Branch) node;
      List list = branch.content();
      int index = list.indexOf(oldChild);

      if (index < 0) {
        throw new DOMException(DOMException.NOT_FOUND_ERR,
            "Tried to replace a non existing child " + "for node: "
                + node);
View Full Code Here

        // update reference to updated business group object
        BusinessGroup modifiedGroup = groupManager.loadBusinessGroup(this.currentGroup);
        if (groupListModel != null) {
          List groups = groupListModel.getObjects();
          if (groups.contains(this.currentGroup)) {
            int i = groups.indexOf(this.currentGroup);
            groups.set(i, modifiedGroup);
          }
        }
        this.currentGroup = modifiedGroup;
      }
View Full Code Here

            String daString = defaultAppearance.getString();
            PDFStreamParser daParser = new PDFStreamParser(new ByteArrayInputStream( daString.getBytes() ), null );
            daParser.parse();
            List daTokens = daParser.getTokens();
            fontSize = calculateFontSize( pdFont, boundingBox, tokens, daTokens );
            int fontIndex = daTokens.indexOf( PDFOperator.getOperator( "Tf" ) );
            if(fontIndex != -1 )
            {
                daTokens.set( fontIndex-1, new COSFloat( fontSize ) );
            }
            ContentStreamWriter daWriter = new ContentStreamWriter(output);
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.