Java Vector from String getposString(Vector vect_valores, String valor)

Here you can find the source of getposString(Vector vect_valores, String valor)

Description

Returns the position of the element at the vector, -1 if does not appear

License

Open Source License

Parameter

Parameter Description
vect_valores Vector of values
valor Value to seek

Return

Position of the value searched

Declaration

public static int getposString(Vector vect_valores, String valor) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    /**/*from ww  w  .j a  va 2  s.com*/
     * <p>
     * Returns the position of the element at the vector, -1 if does not appear
     * </p>
     * @param vect_valores  Vector of values
     * @param valor         Value to seek
     * @return              Position of the value searched
     */
    public static int getposString(Vector vect_valores, String valor) {
        for (int i = 0; i < vect_valores.size(); i++)
            if (vect_valores.elementAt(i).equals(valor))
                return (i);
        return (-1);
    }
}

Related

  1. constructFilter(String hostname, Vector schedulertypes)
  2. containSource(Vector sources, String source)
  3. convertStringToVector(String source, String separator)
  4. createNodeValueVector(final String val)
  5. getKeyStringAsVector(String keyString, String separator)
  6. getStringFromTokens(Vector vector, String delimiter)
  7. implode(Vector handler, String separator)
  8. implode(Vector strings, char delim)
  9. orderedStringInsert(String key, Vector into)