org.eadge.extractpdfexcel.data.block.Direction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pdf-to-excel Show documentation
Show all versions of pdf-to-excel Show documentation
A Java library used to convert PDF to Excel.
The newest version!
package org.eadge.extractpdfexcel.data.block;
/**
* Created by eadgyo on 16/07/16.
*
* Used to indicate direction.
*/
public enum Direction
{
LEFT,
RIGHT,
TOP,
BOTTOM;
public boolean isInPortrayMode()
{
return this.equals(TOP) || this.equals(BOTTOM);
}
public int getLaneDirection()
{
return isInPortrayMode() ? 0 : 1;
}
public int getOppositeLaneDirection()
{
return isInPortrayMode() ? 1 : 0;
}
public int getLaneDirectionVector()
{
return isInPortrayMode() ? 1 : 0;
}
public int getOppositeLaneDirectionVector()
{
return isInPortrayMode() ? 0 : 1;
}
}