de.grogra.mtg
Class MTGBranch
java.lang.Object
de.grogra.mtg.MTGBranch
public class MTGBranch
- extends java.lang.Object
Constructor Summary |
MTGBranch(int nodeIndex,
int plant,
int scale)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MTGBranch
public MTGBranch(int nodeIndex,
int plant,
int scale)
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)