com.swath
Class Bubble

java.lang.Object
  extended bycom.swath.Info
      extended bycom.swath.Bubble

public final class Bubble
extends Info

This class represents a bubble in TW.

Since:
SWATH 1.5

Field Summary
static int TYPE_BLACK_HOLE
          This is a black hole.
static int TYPE_DEAD_END
          This is a dead end/tunnel.
static int TYPE_NORMAL
          This is a normal bubble.
 
Method Summary
 java.lang.Object clone()
           
 int depth()
          Gets the depth of this bubble in number of sectors from the gate sector to the depest sector in the bubble.
 int distanceFromSector1()
          Gets the distance from sector 1 to the bubble.
 int distanceFromStarDock()
          Gets the distance from the StarDock to the bubble.
 int distanceToSector1()
          Gets the distance from the bubble to sector 1.
 int distanceToStarDock()
          Gets the distance from the bubble to the StarDock.
 void dump()
          Dumps the bubble info in the terminal window.
 boolean equals(java.lang.Object obj)
           
 int[] gates()
          Gets the gate sector(s) for the bubble.
 int index()
          Gets the bubble index.
 int[] sectors()
          Gets the bubble sectors.
 int secure()
          Indicates if the bubble is secure or not.
 int size()
          Gets the number of sectors behind the gate sector(s).
 java.lang.String toString()
           
 int type()
          Gets the bubble type.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NORMAL

public static final int TYPE_NORMAL
This is a normal bubble.

See Also:
Constant Field Values

TYPE_DEAD_END

public static final int TYPE_DEAD_END
This is a dead end/tunnel.

See Also:
Constant Field Values

TYPE_BLACK_HOLE

public static final int TYPE_BLACK_HOLE
This is a black hole. There is no way out.

See Also:
Constant Field Values
Method Detail

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

index

public int index()
Gets the bubble index.

Returns:
The bubble index.
Since:
SWATH 1.5

type

public int type()
         throws java.lang.Exception
Gets the bubble type.

Returns:
The type of this bubble.
Throws:
java.lang.Exception
Since:
SWATH 1.5
See Also:
TYPE_NORMAL, TYPE_DEAD_END, TYPE_BLACK_HOLE

gates

public int[] gates()
            throws java.lang.Exception
Gets the gate sector(s) for the bubble.

Returns:
An array with the gate sector number(s).
Throws:
java.lang.Exception
Since:
SWATH 1.5

size

public int size()
         throws java.lang.Exception
Gets the number of sectors behind the gate sector(s).

Returns:
The size of this bubble.
Throws:
java.lang.Exception
Since:
SWATH 1.5

depth

public int depth()
          throws java.lang.Exception
Gets the depth of this bubble in number of sectors from the gate sector to the depest sector in the bubble.

Returns:
The depth of this bubble or -1 if unknown.
Throws:
java.lang.Exception
Since:
SWATH 1.5

distanceToStarDock

public int distanceToStarDock()
                       throws java.lang.Exception
Gets the distance from the bubble to the StarDock.

Returns:
The number of hops to the StarDock or -1 if unknown.
Throws:
java.lang.Exception
Since:
SWATH 1.5
See Also:
distanceFromStarDock()

distanceFromStarDock

public int distanceFromStarDock()
                         throws java.lang.Exception
Gets the distance from the StarDock to the bubble.

Returns:
The number of hops from the StarDock or -1 if unknown.
Throws:
java.lang.Exception
Since:
SWATH 1.6.2
See Also:
distanceToStarDock()

distanceToSector1

public int distanceToSector1()
                      throws java.lang.Exception
Gets the distance from the bubble to sector 1.

Returns:
The number of hops to sector 1 or -1 if unknown.
Throws:
java.lang.Exception
Since:
SWATH 1.5
See Also:
distanceFromSector1()

distanceFromSector1

public int distanceFromSector1()
                        throws java.lang.Exception
Gets the distance from sector 1 to the bubble.

Returns:
The number of hops from sector 1 or -1 if unknown.
Throws:
java.lang.Exception
Since:
SWATH 1.6.2
See Also:
distanceToSector1()

sectors

public int[] sectors()
              throws java.lang.Exception
Gets the bubble sectors.

Returns:
An array with all the sectors behind the gate(s).
Throws:
java.lang.Exception
Since:
SWATH 1.5

secure

public int secure()
           throws java.lang.Exception
Indicates if the bubble is secure or not.

Returns:
YES if secure, NO if not secure or UNKNOWN if not known.
Throws:
java.lang.Exception
Since:
SWATH 1.5
See Also:
Swath.YES, Swath.NO, Swath.UNKNOWN

dump

public void dump()
          throws java.lang.Exception
Dumps the bubble info in the terminal window.

Throws:
java.lang.Exception
Since:
SWATH 1.5