public abstract class WoodPiece
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
WoodPiece.Property |
Modifier | Constructor and Description |
---|---|
protected |
WoodPiece(LogCategory logCategory,
int id,
LoggableTree tree,
int rank,
boolean withBark,
boolean withPith)
Deprecated.
|
protected |
WoodPiece(LogCategory logCategory,
LoggableTree tree,
boolean overbark,
double volumeOfThisWoodPieceM3)
Constructor #2.
|
Modifier and Type | Method and Description |
---|---|
double |
getBarkVolumeM3()
This method returns the volume (m3) of this wood piece without any expansion factor.
|
int |
getId()
This method returns the identification of this piece.
|
LogCategory |
getLogCategory()
This method returns the tree log category associated to this piece.
|
protected double |
getNumberOfStemsExpansionFactor()
This method returns the expansion factor for the number of stems.
|
protected double |
getPlotWeightExpansionFactor()
This method returns the plot weight expansion factor in the case of unequal sampling probability or
unequal areas represented by each plot.
|
java.lang.Double |
getProperty(WoodPiece.Property property)
This method returns the value of a given property.
|
int |
getRank()
This method return the rank of the log in the tree from the stump to the top.
|
double |
getTotalVolumeM3()
This method returns the volume (m3) of this wood piece including the bark without any expansion factor.
|
LoggableTree |
getTreeFromWhichComesThisPiece()
This method returns the LoggableTree object from which this piece originates.
|
double |
getWeightedBarkVolumeM3()
This method returns the weighted volume of the bark in m3.
|
double |
getWeightedTotalVolumeM3()
This method returns the weighted volume of the wood and the bark in m3.
|
double |
getWeightedWoodVolumeM3()
This method returns the weighted volume of this WoodPiece instance in m3.
|
double |
getWoodVolumeM3()
This method returns the volume (m3) of this wood piece without any expansion factor.
|
boolean |
isWithBark()
This method returns true if the piece was calculated with bark or false otherwise.
|
boolean |
isWithPith()
This method returns true if the piece was calculated with pith or false otherwise.
|
void |
setProperty(WoodPiece.Property property,
java.lang.Double value)
This method sets a particular property for this wood piece.
|
@Deprecated protected WoodPiece(LogCategory logCategory, int id, LoggableTree tree, int rank, boolean withBark, boolean withPith)
logCategory
- a TreeLogCategory instanceid
- an Integer that represents the id of this piecetree
- a LoggableTree instancerank
- an Integer that is the rank of this log in the tree from the stump to the topwithBark
- a boolean that indicates whether or not the piece was calculated with barkwithPith
- a boolean that indicates whether or not the piece was calculated with pithprotected WoodPiece(LogCategory logCategory, LoggableTree tree, boolean overbark, double volumeOfThisWoodPieceM3)
logCategory
- a TreeLogCategory instancetree
- a LoggableTree instanceoverbark
- a booleanvolumeOfThisWoodPieceM3
- the volume of wood in a single log (NOTE: without any weighting)protected double getNumberOfStemsExpansionFactor()
protected double getPlotWeightExpansionFactor()
public double getWoodVolumeM3()
public double getBarkVolumeM3()
public double getTotalVolumeM3()
public java.lang.Double getProperty(WoodPiece.Property property)
property
- the name of the property (String)public void setProperty(WoodPiece.Property property, java.lang.Double value)
property
- a String that is the property namevalue
- a Double that is the value of the propertypublic int getId()
public LogCategory getLogCategory()
public LoggableTree getTreeFromWhichComesThisPiece()
public int getRank()
public double getWeightedWoodVolumeM3()
public double getWeightedBarkVolumeM3()
public double getWeightedTotalVolumeM3()
public boolean isWithBark()
public boolean isWithPith()