Higraph, v1.0, January 29, 2003 (02:21 PM)

uk.ac.ed.inf.higraph
Class Blobs

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--uk.ac.ed.inf.higraph.Blobs
All Implemented Interfaces:
Cloneable, Map, Serializable

public class Blobs
extends HashMap

Map of Blobs with String ids as keys.

Version:
1.0
Author:
Daniele Turi
See Also:
Serialized Form

Constructor Summary
Blobs()
          Creates a new Blobs instance invoking the corresponding superclass constructor.
Blobs(int initialCapacity)
          Creates a new Blobs instance.
Blobs(int initialCapacity, float loadFactor)
          Creates a new Blobs instance.
Blobs(Map m)
          Creates a new Blobs instance.
 
Method Summary
 void add(Blob blob)
          Adds blob to this using its id as key.
static void addBlobs(Blobs blobs, Blobs newBlobs)
          Adds newBlobs to blobs.
 boolean equals(Object o)
          Returns true if o is a Blobs of the same size as this and with the same labels.
 Blobs getAll()
          Returns all the blobs and sub-blobs in this.
 Set getAllBounds()
          Returns all bounds in the blobs and sub-blobs of this.
 Set getAllIds()
          Returns all ids in the blobs and sub-blobs of this.
 Set getAllLabels()
          Returns all labels in the blobs and sub-blobs of this.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
hashCode
 

Constructor Detail

Blobs

public Blobs()
Creates a new Blobs instance invoking the corresponding superclass constructor.


Blobs

public Blobs(Map m)
Creates a new Blobs instance. invoking the corresponding superclass constructor.

Parameters:
m - a Map value

Blobs

public Blobs(int initialCapacity)
Creates a new Blobs instance. invoking the corresponding superclass constructor.

Parameters:
initialCapacity - an int value

Blobs

public Blobs(int initialCapacity,
             float loadFactor)
Creates a new Blobs instance. invoking the corresponding superclass constructor.

Parameters:
initialCapacity - an int value
loadFactor - a float value
Method Detail

getAll

public Blobs getAll()
Returns all the blobs and sub-blobs in this.

Returns:
all the blobs and sub-blobs in this as a Blobs value

getAllLabels

public Set getAllLabels()
Returns all labels in the blobs and sub-blobs of this.

Returns:
all labels in the blobs and sub-blobs of this as a Set value

getAllIds

public Set getAllIds()
Returns all ids in the blobs and sub-blobs of this.

Returns:
all ids in the blobs and sub-blobs of this as a Set value

getAllBounds

public Set getAllBounds()
Returns all bounds in the blobs and sub-blobs of this.

Returns:
all bounds in the blobs and sub-blobs of this as a Set value

add

public void add(Blob blob)
Adds blob to this using its id as key.

Parameters:
blob - a Blob value

addBlobs

public static void addBlobs(Blobs blobs,
                            Blobs newBlobs)
Adds newBlobs to blobs.

Parameters:
blobs - a Blobs value
newBlobs - a Blobs value

equals

public boolean equals(Object o)
Returns true if o is a Blobs of the same size as this and with the same labels.

Specified by:
equals in interface Map
Overrides:
equals in class AbstractMap
Parameters:
o - an Object value
Returns:
true if o is a Blobs of the same size as this and with the same labels.

Higraph, v1.0, January 29, 2003 (02:21 PM)

Copyright © The University of Edinburgh. All Rights Reserved.