com.sun.electric.database.network
Class Global.Set

java.lang.Object
  extended by com.sun.electric.database.network.Global.Set
All Implemented Interfaces:
java.lang.Comparable<Global.Set>
Enclosing class:
Global

public static class Global.Set
extends java.lang.Object
implements java.lang.Comparable<Global.Set>

A Global.Set defines a set of Global signals.


Field Summary
static Global.Set empty
          A private set for search in allSets.
 
Method Summary
 int compareTo(Global.Set set)
          Compares this Global.Set with the specified Global.Set for order.
 boolean contains(Global global)
          Returns true if this Global.Set contains a specified Global.
 Global get(int i)
          Returns a Global from this set by specified index.
 PortCharacteristic getCharacteristic(Global global)
          Returns characteristic of a specified Global in a set.
 int indexOf(Global g)
          Returns an index of specified Global in this set.
 int maxElement()
          Returns the maximal index of Globals in this Set.
 Global.Set remove(java.util.Iterator<Global> gs)
          Returns this Set with removed all globals given by the iterator.
 int size()
          Returns the number of Globals in this Global.Set.
 java.lang.String toString()
          Returns a printable version of this GlobalSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

empty

public static final Global.Set empty
A private set for search in allSets.

Method Detail

contains

public final boolean contains(Global global)
Returns true if this Global.Set contains a specified Global.

Parameters:
global - The Global whose presence in this set is to be tested
Returns:
true if this Global Set contains a specified Global.

getCharacteristic

public PortCharacteristic getCharacteristic(Global global)
Returns characteristic of a specified Global in a set. Returns null if a specified Global not in a set..

Parameters:
global - The Global whose presence in this set is to be tested
Returns:
Characteristic of specified Global or null.

size

public final int size()
Returns the number of Globals in this Global.Set.

Returns:
the number of Globals in this Global.Set.

get

public final Global get(int i)
Returns a Global from this set by specified index.

Parameters:
i - specified index of global.
Returns:
a Global from this set by specified index.

indexOf

public final int indexOf(Global g)
Returns an index of specified Global in this set. Returns -1 if Global is not in set.

Parameters:
g - specified global.
Returns:
a Global from this set by specified index.

maxElement

public final int maxElement()
Returns the maximal index of Globals in this Set.

Returns:
the maximal index of Globals in this Set or (-1) for empty Set.

compareTo

public int compareTo(Global.Set set)
Compares this Global.Set with the specified Global.Set for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface java.lang.Comparable<Global.Set>
Parameters:
set - the Global.Set to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

toString

public java.lang.String toString()
Returns a printable version of this GlobalSet.

Overrides:
toString in class java.lang.Object
Returns:
a printable version of this GlobalSet.

remove

public Global.Set remove(java.util.Iterator<Global> gs)
Returns this Set with removed all globals given by the iterator.

Parameters:
gs - iterator with globals
Returns:
Set with removed globals.