public class DatumPath extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
protected ArrayList<Object> |
m_path |
static int |
s_maxSize |
Constructor and Description |
---|
DatumPath() |
DatumPath(DatumPath other)
copy constructor
|
Modifier and Type | Method and Description |
---|---|
DatumPath |
add(int new_value)
Like add(String).
|
DatumPath |
add(Object newValue)
add() grows this by 1, inserting newValue at the end.
|
DatumPath |
add(String new_value)
convenience! Like add(int), but the other way around.
|
DatumPath |
clear()
setSize(0).
|
Object |
clone() |
void |
copy(DatumPath other)
like a copy constructor without the constructor
|
boolean |
equals(Object otherObject) |
Object |
get(int idx)
get() returns an element, which will be either a String or an Integer.
|
static void |
main(String[] args) |
boolean |
numbersLessThan(DatumPath other) |
void |
set(int idx,
Object new_value)
set() sets an element of the path.
|
DatumPath |
setSize(int newSize)
setSize(): resize.
|
int |
size() |
boolean |
startsWith(DatumPath prefix)
Works like String.startsWith:
returns true iff prefix.size() <= this.size()
AND if, for 0 <= i < prefix.size(), this.get(i).equals(prefix.get(i))
|
String |
toString()
toString() outputs the path (from segmentID onward) in the ZYX[a]-b[c]-d-e
style (TODO: give it a name), suitable for a key in a map of
message datum paths to values.
|
public static final int s_maxSize
public DatumPath()
public boolean startsWith(DatumPath prefix)
public void set(int idx, Object new_value)
public Object get(int idx)
public int size()
public String toString()
public DatumPath add(Object newValue)
public DatumPath add(int new_value)
public DatumPath setSize(int newSize)
public boolean numbersLessThan(DatumPath other)
Copyright © 2001–2017 University Health Network. All rights reserved.