|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.jibx.binding.util.SparseStack
public class SparseStack
Stack for values that depend on the level of nesting, where only some of the levels change the current value.
| Field Summary | |
|---|---|
private java.lang.Object |
m_current
Current item. |
private ObjectStack |
m_items
Stack of different items (paired with m_levels stack). |
private int |
m_level
Current nesting level. |
private IntStack |
m_levels
Levels with different items (paired with m_items stack). |
| Constructor Summary | |
|---|---|
SparseStack()
Constructor with no initial value. |
|
SparseStack(java.lang.Object current)
Constructor with initial value. |
|
| Method Summary | |
|---|---|
void |
enter()
Enter a level of nesting. |
java.lang.Object |
exit()
Exit a level of nesting with changed item returned. |
java.lang.Object |
getCurrent()
Get current object. |
void |
setCurrent(java.lang.Object obj)
Set current object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.Object m_current
private int m_level
private IntStack m_levels
private ObjectStack m_items
| Constructor Detail |
|---|
public SparseStack(java.lang.Object current)
current - initial valuepublic SparseStack()
| Method Detail |
|---|
public java.lang.Object getCurrent()
public void setCurrent(java.lang.Object obj)
obj - set the current objectpublic void enter()
public java.lang.Object exit()
null if
same item still active
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||