package Sight.Structures;


/** Class to keep single string as Strings. */

public class singletonString extends Strings implements java.io.Serializable
{

  public singletonString(String bkg)
    { super(0,0);
      L = new String[1];
      L[0] = bkg;
      length = 1;
    };

   public boolean has(String N)
   /** Tests if this Strings has the string N (case sensitive). */
    { return (L[0].equalsIgnoreCase(N));
    };

   public int indexOf(String N)
   /** Number of this string in array L */
    { if (has(N)) return 0;
      return -1;
    };

   public void Clear() { not_supported(); };

   public String at(int x) throws ArrayIndexOutOfBoundsException
    { if (x==0) return L[0];
      return null;
    };

   public void Sort() {};

   public void add(String N)                  { not_supported(); };
   public void addExc(String N)               { not_supported(); };
   public void remove(String n)               { not_supported(); };
   public void setElementAt(String N, int p)  { not_supported(); };
   void merge(Strings x)                      { not_supported(); };
   public void add(Strings x)                 { not_supported(); };
   public void merge_x(Strings x)             { not_supported(); };

   public void not_supported()
   {
      throw new Error("not supported method is singleString");
   };


 }