Vector elementAt - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Vector elementAt method.

This code example shows how to use the following methods:elementAt
				TopicMetaDataXmlReader xmlreader1=null;
				Vector vect=new Vector();
				xmlreader1=new TopicMetaDataXmlReader(path+"/configuregrade.xml");
				vect=xmlreader1.getAssignmentDetails1();
				 
				int percentage=Integer.parseInt(((FileEntry) vect.elementAt(0)).getUserName());
				int percentage1=Integer.parseInt(((FileEntry) vect.elementAt(1)).getUserName());
				int percentage2=Integer.parseInt(((FileEntry) vect.elementAt(2)).getUserName());
				int percentage3=Integer.parseInt(((FileEntry) vect.elementAt(3)).getUserName());
				int percentage4=Integer.parseInt(((FileEntry) vect.elementAt(4)).getUserName());
				context.put("percentage",percentage);
				context.put("percentage1",percentage1);
				context.put("percentage2",percentage2);
				context.put("percentage3",percentage3);
				context.put("percentage4",percentage4);
					 
			} 
		}catch(Exception e){ErrorDumpUtil.ErrorLog(e.getMessage());}
	} 
} 
7
CodeRank
This code example shows how to use the following methods:addElement, elementAt
 
  /** 
   */ 
  public TransportAddress stringToAddr(String s) throws ICPException {
    Vector  addressFields = parseURL(s);
    String protocol = (String) addressFields.elementAt(0);
 
    if (!NAME.equals(protocol)) {
      throw new ICPException("Unexpected protocol \""+protocol+"\" when \""+NAME+"\" was expected.");
    }  
 
    String host = (String) addressFields.elementAt(1);
    String port = (String) addressFields.elementAt(2);
    String file = (String) addressFields.elementAt(3);
    String anchor = (String) addressFields.elementAt(4);
 
    return new HTTPAddress(host, port, file, anchor);
  }  
 
  /** 

6
CodeRank
This code example shows how to use the following methods:elementAt
    public final int lastIndexOf(String elem, int index) {
        return vector.lastIndexOf(elem, index);
    } 
     
    public final String elementAt(int index) {
        return (String)vector.elementAt(index);
    } 
     
    public final String firstElement() {
        return (String)vector.firstElement();
    } 
     
    public final String lastElement() {
        return (String)vector.lastElement();
    } 
     
    public final void setElementAt(String obj, int index) {
        vector.setElementAt(obj, index);
    } 
     
6
CodeRank
This code example shows how to use the following methods:elementAt, indexOf, removeElement, size
 
    public void closeFrame(final JInternalFrame f) {
        if (f == fCurrentFrame) {
            activateNextFrame(); 
        } 
        fChildFrames.removeElement(f);
        super.closeFrame(f);
    } 
 
    public void deiconifyFrame(final JInternalFrame f) {
        JInternalFrame.JDesktopIcon desktopIcon;
 
        desktopIcon = f.getDesktopIcon();
        // If the icon moved, move the frame to that spot before expanding it 
        // reshape does delta checks for us 
        f.reshape(desktopIcon.getX(), desktopIcon.getY(), f.getWidth(), f.getHeight());
        super.deiconifyFrame(f);
    } 
 
    void addIcon(final Container c, final JInternalFrame.JDesktopIcon desktopIcon) {

6
CodeRank
This code example shows how to use the following methods:elementAt, size
                } else if (o.equals("Pattern")) {
                    return new PatternColor(library, null);
                } 
            } else if (o instanceof Vector) {
                Vector v = (Vector) o;
                if (v.elementAt(0).equals("Indexed")
                        || v.elementAt(0).equals("I")) {
                    return new Indexed(library, null, v);
                } else if (v.elementAt(0).equals("CalRGB")) {
                    return new CalRGB(library, (Hashtable) v.elementAt(1));
                } else if (v.elementAt(0).equals("Lab")) {
                    return new Lab(library, (Hashtable) v.elementAt(1));
                } else if (v.elementAt(0).equals("Separation")) {
                    return new Separation( 
                            library,
                            null, 
                            v.elementAt(1),
                            v.elementAt(2),
                            v.elementAt(3));
                } else if (v.elementAt(0).equals("DeviceN")) {

6
CodeRank
This code example shows how to use the following methods:add, elementAt, insertElementAt, size
    indent.addElement(new Integer(0));
    nlnum = 0;
  } 
   
  public void pushIndent(int indentoffset) {
      if(indent.size() == 0) {
          indent.add(new Integer(0));
      } 
    indent.insertElementAt(new Integer(((Integer)indent.elementAt(0)).intValue()+indentoffset),0);
  } 
 
  public void popIndent() { 
    indent.removeElementAt(0);
  } 
 
  abstract public void doSubst(ANamedParamExpr node, Hashtable context);
  abstract public void withoutSpace(Token node);
  abstract public void withSpace(Token node);
  abstract public void withNewLine(Token node);
 
6
CodeRank
This code example shows how to use the following methods:elementAt, isEmpty
     * Peek to see if something is available. 
     */ 
    public Object peek() {
	if (isEmpty()) 
	    return null; 
	return vector.elementAt(0);
    } 
     
    /** 
     * Is the queue empty? 
     */ 
    public boolean isEmpty() { 
	return vector.isEmpty();
    } 
 
    /** 
     * How many elements are there in this queue? 
     */ 
    public int size() { 
	return vector.size();
6
CodeRank
This code example shows how to use the following methods:elementAt, size
        // TODO Auto-generated method stub 
        return null; 
    } 
 
    public Node item(int index) {
        if (index < mNodes.size()) {
            return mNodes.elementAt(index);
        } 
        return null; 
    } 
 
    public Node removeNamedItem(String name) throws DOMException {
        Node node = getNamedItem(name);
        if (node == null) {
            throw new DOMException(DOMException.NOT_FOUND_ERR, "Not found");
        } else { 
            mNodes.remove(node);
        } 
        return node;
    } 
6
CodeRank
This code example shows how to use the following methods:elementAt
            whitePoint[1] = ((Number) v.elementAt(1)).floatValue();
            whitePoint[2] = ((Number) v.elementAt(2)).floatValue();
        } 
        v = (Vector) l.getObject(h, "Range");
        if (v != null) {
            range[0] = ((Number) v.elementAt(0)).floatValue();
            range[1] = ((Number) v.elementAt(1)).floatValue();
            range[2] = ((Number) v.elementAt(2)).floatValue();
            range[3] = ((Number) v.elementAt(3)).floatValue();
        } 
 
        lBase = 0.0f;
        lSpread = 100.0f;
        aBase = range[0];
        aSpread = range[1] - aBase;
        bBase = range[2];
        bSpread = range[3] - bBase;
 
        xBase = blackPoint[0];
        xSpread = whitePoint[0] - xBase;
6
CodeRank
This code example shows how to use the following methods:elementAt, size
   * 
   * @param idx int 
   * @return DriveMapping 
   */ 
  public final DriveMapping getMappingAt(int idx) {
    if ( idx < 0 || idx >= m_mappings.size())
      return null; 
    return (DriveMapping) m_mappings.elementAt(idx);
  } 
 
  /** 
   * Find the mapping for the specified local drive 
   *  
   * @param localDrive String 
   * @return DriveMapping 
   */ 
  public final DriveMapping findMapping(String localDrive) {
     
    //	Search the drive mappings list 
     
6
CodeRank

Related Vector elementAt Questions & Answers:

elementAt Method Overview
Returns the component at the specified index.
See Code Examples for other Java 8 Vector Methods: