de.grogra.mtg
Class MTGBranch

java.lang.Object
  extended by de.grogra.mtg.MTGBranch

public class MTGBranch
extends java.lang.Object


Constructor Summary
MTGBranch(int nodeIndex, int plant, int scale)
           
 
Method Summary
 void addElement(MTGBranchElement element)
           
 int baseOfBranch()
           
 int endOfBranch()
           
static boolean equal(MTGBranch a, MTGBranch b)
          Compares if branch a is equal to branch b
 double getAlpha()
           
 int getCategory()
           
 MTGBranchElement getElement(int elementIndex)
           
 int getElementCount()
           
 int getElementIndex(MTGBranchElement element)
           
 int getPlant()
          Get plant which this branch belongs to.
 int getScale()
           
 int getSupportNodeIndex()
           
static boolean greaterThan(MTGBranch a, MTGBranch b)
           
static boolean lessThan(MTGBranch a, MTGBranch b)
          Compares if branch a is less than branch b.
 void setAlpha(double a)
           
 void setCategory(int cat)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTGBranch

public MTGBranch(int nodeIndex,
                 int plant,
                 int scale)
Method Detail

addElement

public void addElement(MTGBranchElement element)

baseOfBranch

public int baseOfBranch()

endOfBranch

public int endOfBranch()

equal

public static boolean equal(MTGBranch a,
                            MTGBranch b)
Compares if branch a is equal to branch b

Parameters:
a -
b -
Returns:
true if a is equal to b, else false.

getAlpha

public double getAlpha()

getCategory

public int getCategory()

getElement

public MTGBranchElement getElement(int elementIndex)

getElementCount

public int getElementCount()

getElementIndex

public int getElementIndex(MTGBranchElement element)

getPlant

public int getPlant()
Get plant which this branch belongs to.

Returns:
Plant index (1-based) which this branch belongs to.

getScale

public int getScale()

getSupportNodeIndex

public int getSupportNodeIndex()

greaterThan

public static boolean greaterThan(MTGBranch a,
                                  MTGBranch b)

lessThan

public static boolean lessThan(MTGBranch a,
                               MTGBranch b)
Compares if branch a is less than branch b.

Parameters:
a -
b -
Returns:
true if a is less than b, else false.

setAlpha

public void setAlpha(double a)

setCategory

public void setCategory(int cat)