Class w3c.jigsaw.http.Bag
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.http.Bag

java.lang.Object
   |
   +----w3c.jigsaw.http.Bag

public class Bag
extends Object
Internal representation of protocol headers conforming to the bag spec. The bag specification is part of the Protocol Extension Protocol defined by w3c, it can be found

Method Index

 o addBag(Bag)
Add a named bag into this bag.
 o addItem(String)
Add an item into this bag.
 o getBag(String)
Get a named sub-bag from this bag.
 o getName()
Get this bag names
 o hasBag(String)
Does this bag have a named sub-bag of the given name ?
 o hasItem(String)
Does this bag contains the given item, being a bag or a simple word.
 o keys()
Get all named items from this bag.

Methods

 o getName
  public String getName()
Get this bag names
Returns:
The name of this bag.
 o addBag
  public void addBag(Bag subbag)
Add a named bag into this bag.
Parameters:
bag - The bag to add (in case item is a bag).
 o hasBag
  public boolean hasBag(String name)
Does this bag have a named sub-bag of the given name ?
Parameters:
name - The name of the sub-bag to be tested for.
Returns:
true if this sub-bag exists.
 o getBag
  public Bag getBag(String name)
Get a named sub-bag from this bag.
Parameters:
name - The name of the sub-bag to get.
Returns:
A bag instance, or null if none was found.
 o addItem
  public void addItem(String name)
Add an item into this bag.
Parameters:
name - The new item name.
 o hasItem
  public boolean hasItem(String name)
Does this bag contains the given item, being a bag or a simple word.
Parameters:
name - The name of the item to test.
Returns:
true if the bag contains the given item, false otherwise.
 o keys
  public Enumeration keys()
Get all named items from this bag. This include both named sub-bags and items by their own.

All Packages  Class Hierarchy  This Package  Previous  Next  Index