/*****************************************************************************/
/* File name: TarFileSystemVector.java                                       */
/* Purpose: a vector of TarFileSystem objects                                */
/*                                                                           */
/* Last modified: 08.08.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/* For the list of authors and contributors of the original C version        */
/* of the GNU tar see files AUTHORS and THANKS                               */
/*                                                                           */
/* This program is distributed in the hope that it will be useful, but       */
/* WITHOUT ANY WARRANTY; without even the implied warranty of                */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General */
/* Public License for more details.                                          */
/*                                                                           */
/* This software is distributed under the terms                              */
/* of the GNU General Public License as published                            */
/* by the Free Software Foundation; either version 2, or (at your option)    */
/* any later version.                                                        */
/* See file COPYING for your rights (GNU GPL)                                */
/*****************************************************************************/

package io;

import java.io.*;
import java.util.*;
import util.*;


public
class

TarFileSystemVector

                       extends Vector

                           implements Serializable
{

  private final static java.lang.String RCSID =
"$Header: /d/NFS/io/RCS/TarFileSystemVector.java,v 1.1 1999/08/08 20:27:43 vklimov Exp $";


  public
  TarFileSystemVector()
/*****************************************************************************/
/* Function name: TarFileSystemVector                                        */
/* File name: TarFileSystemVector.java                                       */
/* Purpose: constructor for the TarFileSystemVector class                    */
/* Parameters:                                                               */
/* Returns:                                                                  */
/* Last modified: 08.08.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/*****************************************************************************/
    {
                                                   /* TarFileSystemVector */
/*---------------------------------------------------------------------------*/

      super();

    }
/*end of TarFileSystemVector*/



  public
  int

  indexOfAName( java.lang.String name )
/*****************************************************************************/
/* Function name: indexOfAName                                               */
/* File name: TarFileSystemVector.java                                       */
/* Purpose: to return the number of an element in this TarFileSystemVector   */
/*          object that has the given name. Only the first order elements    */
/*          are looked at                                                    */
/* Parameters: name                                                          */
/* Returns: the number of the element or                                     */
/*          general.Constants.JAVA_ERROR_CODE if there is no such element    */
/* Last modified: 08.08.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/*****************************************************************************/
    {
      int i = 0;
      TarFileSystem element = null;
                                                         /* indexOfAName */
/*---------------------------------------------------------------------------*/

      while( i < elementCount )
        {
          element = (TarFileSystem) elementAt( i );

          if (element.name.equals( name ))
            return i;                                       /* return ! */
          else
            i++;
        /*end of if*/
        }
    /*end of while-loop*/

      return general.Constants.JAVA_ERROR_CODE;

     }
/*end of indexOfAName*/

} /*end of TarFileSystemVector */

/*****************************************************************************/
/* End of file: TarFileSystemVector.java                                     */
/*****************************************************************************/
