public class OffsetMapper extends Object
Constructor and Description |
---|
OffsetMapper(String string)
Create the offset mappings for the given string and cache them.
|
Modifier and Type | Method and Description |
---|---|
int |
convertToJava(int offset)
Convert the offset from Python to Java.
|
int |
convertToPython(int offset)
Convert the offset from Java to Python.
|
int[] |
getJava2PythonArray()
Return the java to python mapping as am array of ints.
|
List<Integer> |
getJava2PythonList()
Return the java to python mapping as a List of Integers.
|
int[] |
getPython2JavaArray()
Return the java to python mapping as am array of ints.
|
List<Integer> |
getPython2JavaList()
Return the python to java mapping as a List of Integers.
|
public OffsetMapper(String string)
string
- the string to usepublic int convertToPython(int offset)
offset
- java offsetpublic int convertToJava(int offset)
offset
- the python offsetpublic List<Integer> getJava2PythonList()
public List<Integer> getPython2JavaList()
public int[] getJava2PythonArray()
public int[] getPython2JavaArray()
Copyright © 2021 GATE. All rights reserved.