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
-
addBag(Bag)
- Add a named bag into this bag.
-
addItem(String)
- Add an item into this bag.
-
getBag(String)
- Get a named sub-bag from this bag.
-
getName()
- Get this bag names
-
hasBag(String)
- Does this bag have a named sub-bag of the given name ?
-
hasItem(String)
- Does this bag contains the given item, being a bag or a simple word.
-
keys()
- Get all named items from this bag.
getName
public String getName()
- Get this bag names
- Returns:
- The name of this bag.
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).
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.
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.
addItem
public void addItem(String name)
- Add an item into this bag.
- Parameters:
- name - The new item name.
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.
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