// Path: src/main/java/au/net/woodberry/ta/toolbox/object/PivotPoint.java
// public class PivotPoint {
// 
//     private TADecimal pivotPoint; // <- this is the pivot point pivotPoint
//     private TADecimal resistanceOne;
//     private TADecimal resistanceTwo;
//     private TADecimal supportOne;
//     private TADecimal supportTwo;
// 
//     public TADecimal getPivotPoint() {
//         return pivotPoint;
//     }
// 
//     public void setPivotPoint(TADecimal pivotPoint) {
//         this.pivotPoint = pivotPoint;
//     }
// 
//     public TADecimal getResistanceOne() {
//         return resistanceOne;
//     }
// 
//     public void setResistanceOne(TADecimal resistanceOne) {
//         this.resistanceOne = resistanceOne;
//     }
// 
//     public TADecimal getResistanceTwo() {
//         return resistanceTwo;
//     }
// 
//     public void setResistanceTwo(TADecimal resistanceTwo) {
//         this.resistanceTwo = resistanceTwo;
//     }
// 
//     public TADecimal getSupportOne() {
//         return supportOne;
//     }
// 
//     public TADecimal getSupportTwo() {
//         return supportTwo;
//     }
// 
//     public void setSupportOne(TADecimal supportOne) {
//         this.supportOne = supportOne;
//     }
// 
//     public void setSupportTwo(TADecimal supportTwo) {
//         this.supportTwo = supportTwo;
//     }
// }


import au.net.woodberry.ta.toolbox.object.PivotPoint;
import eu.verdelhan.ta4j.TADecimal;
package au.net.woodberry.ta.toolbox.enums;


public enum PivotPointRegion {

    BELOW_SUPPORT_TWO(6),
    BETWEEN_SUPPORT_TWO_AND_SUPPORT_ONE(5),
    BETWEEN_SUPPORT_ONE_AND_PIVOT_POINT(4),
    BETWEEN_PIVOT_POINT_AND_RESISTANCE_ONE(3),
    BETWEEN_RESISTANCE_ONE_AND_RESISTANCE_TWO(2),
    ABOVE_RESISTANCE_TWO(1);

    private final int rank;

    PivotPointRegion(int rank) {
        this.rank = rank;
    }
    
    public int getRank() {
        return rank;
    }

    /**
     * Determines the region given a value and pivot point
     *  
     * @param pivotPoint The pivot point object
     * @param value A reference value
     * @return
     */
// Path: src/main/java/au/net/woodberry/ta/toolbox/object/PivotPoint.java
// public class PivotPoint {
// 
//     private TADecimal pivotPoint; // <- this is the pivot point pivotPoint
//     private TADecimal resistanceOne;
//     private TADecimal resistanceTwo;
//     private TADecimal supportOne;
//     private TADecimal supportTwo;
// 
//     public TADecimal getPivotPoint() {
//         return pivotPoint;
//     }
// 
//     public void setPivotPoint(TADecimal pivotPoint) {
//         this.pivotPoint = pivotPoint;
//     }
// 
//     public TADecimal getResistanceOne() {
//         return resistanceOne;
//     }
// 
//     public void setResistanceOne(TADecimal resistanceOne) {
//         this.resistanceOne = resistanceOne;
//     }
// 
//     public TADecimal getResistanceTwo() {
//         return resistanceTwo;
//     }
// 
//     public void setResistanceTwo(TADecimal resistanceTwo) {
//         this.resistanceTwo = resistanceTwo;
//     }
// 
//     public TADecimal getSupportOne() {
//         return supportOne;
//     }
// 
//     public TADecimal getSupportTwo() {
//         return supportTwo;
//     }
// 
//     public void setSupportOne(TADecimal supportOne) {
//         this.supportOne = supportOne;
//     }
// 
//     public void setSupportTwo(TADecimal supportTwo) {
//         this.supportTwo = supportTwo;
//     }
// }


// Path: src/main/java/au/net/woodberry/ta/toolbox/enums/PivotPointRegion.java
import au.net.woodberry.ta.toolbox.object.PivotPoint;
import eu.verdelhan.ta4j.TADecimal;

package au.net.woodberry.ta.toolbox.enums;


public enum PivotPointRegion {

    BELOW_SUPPORT_TWO(6),
    BETWEEN_SUPPORT_TWO_AND_SUPPORT_ONE(5),
    BETWEEN_SUPPORT_ONE_AND_PIVOT_POINT(4),
    BETWEEN_PIVOT_POINT_AND_RESISTANCE_ONE(3),
    BETWEEN_RESISTANCE_ONE_AND_RESISTANCE_TWO(2),
    ABOVE_RESISTANCE_TWO(1);

    private final int rank;

    PivotPointRegion(int rank) {
        this.rank = rank;
    }
    
    public int getRank() {
        return rank;
    }

    /**
     * Determines the region given a value and pivot point
     *  
     * @param pivotPoint The pivot point object
     * @param value A reference value
     * @return
     */
    public static PivotPointRegion getRegion(PivotPoint pivotPoint, TADecimal value) {