@Override
    public String toString()
    {
        StringBuilder sb = new StringBuilder();
        // start cell tag
        sb.append( "<" );
        sb.append( tagName );
        if ( className !=null && className.length()>0 )
        {
            sb.append( " class=\"" );
            sb.append( className );
            sb.append( "\"" );
        }
        if ( id != 0 )
        {
            sb.append( " id=\"t" );
            String idStr = Integer.toString(id);
            sb.append( idStr );
            sb.append( "\"" );
        }
        sb.append( ">" );
        for ( int i=0;i<segments.size();i++ )
            sb.append( segments.get(i).toString() );
        sb.append( "</" );
        sb.append( tagName );
        sb.append( ">" );
        return sb.toString();
    }