CS 1705 Library

cs1705.web
Class OldWebBot.HeadingDescriptor

java.lang.Object
  extended by cs1705.web.OldWebBot.HeadingDescriptor
Enclosing class:
OldWebBot

public static class OldWebBot.HeadingDescriptor
extends Object

Represents the content of an HTML heading entry. Headings are immutable once created. This class is used to build an iterator over selected headings using OldWebBot.getHeadings() and its relatives.


Constructor Summary
OldWebBot.HeadingDescriptor(int level, String text)
          Creates a new heading descriptor.
 
Method Summary
 int getLevel()
          Get this heading's level (1-6).
 String getText()
          Get this heading's text (title).
 String toString()
          Get a printable version of this heading.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OldWebBot.HeadingDescriptor

public OldWebBot.HeadingDescriptor(int level,
                                   String text)
Creates a new heading descriptor.

Parameters:
level - The level number of this heading (1-6)
text - The text content of this heading
Method Detail

getText

public String getText()
Get this heading's text (title).

Returns:
The text content of this heading

getLevel

public int getLevel()
Get this heading's level (1-6).

Returns:
The level number of this heading

toString

public String toString()
Get a printable version of this heading.

Overrides:
toString in class Object
Returns:
The same as getText()

Last updated: Wed, Apr 1, 2009 • 12:29 AM EDT

Copyright © 2009 Virginia Tech.