Package org.qdl_lang.state
Class StemMultiIndex
- java.lang.Object
-
- org.qdl_lang.state.StemMultiIndex
-
public class StemMultiIndex extends Object
If we get a stem variable, this has the components to it
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StemMultiIndex()
StemMultiIndex(String variable)
Creates a new instance from the variable.StemMultiIndex(StemMultiIndex w, int newNameIndex)
Given a stem wrapper where a stem reference has been found at newNameIndex, make a new object suitable for handing to a stem variable for resolution.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getComponents()
String
getLastComponent()
String
getName()
int
getRealLength()
boolean
isEmpty()
So no indices.boolean
isStem()
void
setRealLength(int realLength)
StemMultiIndex
truncate()
Returns a new Stem that is adjusted to the realLength
-
-
-
Constructor Detail
-
StemMultiIndex
public StemMultiIndex(StemMultiIndex w, int newNameIndex)
Given a stem wrapper where a stem reference has been found at newNameIndex, make a new object suitable for handing to a stem variable for resolution. The original index, w, should have itsrealLength
adjusted accordingly- Parameters:
w
-newNameIndex
-
-
StemMultiIndex
public StemMultiIndex(String variable)
Creates a new instance from the variable. Note that the name is the entire stem name, so a.i.j... and this parses it into components. The very first component is always the name of the stem.- Parameters:
variable
-
-
StemMultiIndex
protected StemMultiIndex()
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
So no indices.- Returns:
-
getRealLength
public int getRealLength()
-
setRealLength
public void setRealLength(int realLength)
-
getLastComponent
public String getLastComponent()
-
getName
public String getName()
-
isStem
public boolean isStem()
-
truncate
public StemMultiIndex truncate()
Returns a new Stem that is adjusted to the realLength- Returns:
-
-