FileDocCategorySizeDatePackage
WritableDataImpl.javaAPI DocGlassfish v2 API4548Fri May 04 22:34:44 BST 2007com.sun.enterprise.diagnostics.collect

WritableDataImpl

public class WritableDataImpl extends Object implements WritableData
author
Manisha Umbarje

Fields Summary
protected List
children
protected List
values
protected List
table
protected String
source
protected String
type
private static int
INITIAL_CAPACITY
Constructors Summary
public WritableDataImpl()

    
      
        this("", DataType.CONTAINER);
    
public WritableDataImpl(String type)

        this("",type);
    
public WritableDataImpl(String source, String type)
Creates a new instance of WritableDataImpl

        this(source,type, 5,20);
    
public WritableDataImpl(String source, String type, int initialValuesCapacity)

        this(source, type, INITIAL_CAPACITY, initialValuesCapacity);
        
    
public WritableDataImpl(String source, String type, int initialChildrenCapacity, int initialValuesCapacity)

        this(source,type, initialChildrenCapacity,
                initialValuesCapacity,INITIAL_CAPACITY);
        
    
public WritableDataImpl(String source, String type, int initialChildrenCapacity, int initialValuesCapacity, int initialTableCapacity)

        
        this.source= source;
        this.type = type;
        children = new ArrayList(initialChildrenCapacity);
        values = new ArrayList(initialValuesCapacity);
        table = new ArrayList(initialTableCapacity);
        
    
Methods Summary
public voidaddChild(com.sun.enterprise.diagnostics.Data dataObj)

        if(dataObj != null)
            children.add(dataObj);
    
public voidaddRow(java.util.List list)

        if(list != null)
            table.add(list);
    
public voidaddValue(java.lang.String value)

        values.add(value);
    
public java.util.IteratorgetChildren()

        return children.iterator();
    
public java.lang.StringgetSource()

        return source;
    
public java.util.IteratorgetTable()

        List<Iterator<String>> listOfIterators = new ArrayList();
        Iterator<List<String>> iterator = table.iterator();
        while(iterator.hasNext()) {
            List row = iterator.next();
            listOfIterators.add(row.iterator());
        }
        return listOfIterators.iterator();
    
public java.lang.StringgetType()

        return type;
    
public java.util.IteratorgetValues()

        return values.iterator();