package bilab;

/// string that can be annotated (& the actual string value
///  is itself the value of an annotation)
public class AnnotatedString implements IAnnotated
{
  public AnnotatedString()
  {
    annotations = new scigol.Map();
    annotations.add(key,"");
  }
  
  public AnnotatedString(String s)
  {
    annotations = new scigol.Map();
    annotations.add(key,s);
  }
  
  public static final String key = "value";
  
  
  @scigol.accessor
  public String get_string()
  {
    return (String)annotations.get_Item(key).value;
  }
  
  public String toString()
  {
    return get_string();
  }
  
  
  public scigol.Map get_annotations()
  {
    return annotations;
  }

  private scigol.Map annotations;
}
