www.pudn.com > htmlsaver.rar > WordOfURL.java


public class WordOfURL 
{ 
  final static int WORD_NUMBER = 0; 
   
  public int type; 
  public Object value; 
   
  public WordOfURL(int type, Object value) 
  { 
    this.type = type; 
    this.value = value; 
  } 
   
  public WordOfURL(WordOfURL word) 
  { 
    type = word.type; 
    if (type == WORD_NUMBER) 
    { 
      value = new Integer(((Integer)word.value).intValue()); 
    } 
    else 
    { 
      value = ""; 
    } 
  } 
   
  public String getValue() 
  { 
    if (type == WORD_NUMBER) 
    { 
      Integer v = (Integer)value; 
      return v.toString(); 
    } 
    else 
    { 
      return value.toString(); 
    } 
  } 
}