Package cz.vutbr.fit.layout.segm.op
Class FlattenTreeOperator
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.BaseService
-
- cz.vutbr.fit.layout.impl.BaseParametrizedOperation
-
- cz.vutbr.fit.layout.impl.BaseOperator
-
- cz.vutbr.fit.layout.segm.op.FlattenTreeOperator
-
- All Implemented Interfaces:
AreaTreeOperator
,ParametrizedOperation
,Service
public class FlattenTreeOperator extends BaseOperator
This operator flattens the tree: only the root area and the leaf areas are preserved.- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description FlattenTreeOperator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(AreaTree atree)
Applies the operation to the given tree.void
apply(AreaTree atree, Area root)
Applies the operation to the given subtree of the tree.String
getCategory()
A category that allows to group similar services.String
getDescription()
Obtains a longer description of the service.String
getId()
Obtains a unique ID of the serviceString
getName()
Obtains a descriptive name of the service that may be presented to the user.-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseOperator
toString
-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseParametrizedOperation
defineParams, getParam, getParams, getParamString, setParam
-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseService
getServiceManager, setServiceManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cz.vutbr.fit.layout.api.ParametrizedOperation
getParam, getParams, getParamString, setParam
-
Methods inherited from interface cz.vutbr.fit.layout.api.Service
setServiceManager
-
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:Service
Obtains a unique ID of the service
-
getName
public String getName()
Description copied from interface:Service
Obtains a descriptive name of the service that may be presented to the user.- Returns:
- the operator name
-
getDescription
public String getDescription()
Description copied from interface:Service
Obtains a longer description of the service.- Returns:
- the description
-
getCategory
public String getCategory()
Description copied from interface:Service
A category that allows to group similar services.- Returns:
- Category name or
null
when no category is assigned.
-
apply
public void apply(AreaTree atree)
Description copied from interface:AreaTreeOperator
Applies the operation to the given tree.- Parameters:
atree
- the area tree to be modified.
-
apply
public void apply(AreaTree atree, Area root)
Description copied from interface:AreaTreeOperator
Applies the operation to the given subtree of the tree.- Parameters:
atree
- the area tree to be modified.root
- the root node of the affected subtree.
-
-