public class Freezer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Freezer.FrozenIterator
This class iterates over an array.
|
Modifier | Constructor and Description |
---|---|
protected |
Freezer()
This class currently is not used as a class but only as a helper.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Map |
createAbsoluteOrderMap()
Create a map whose elements are ordered according to an
absolute ordering.
|
static java.util.Iterator |
createFrozenIterator(java.lang.Object[] frozen)
Create an iterator over frozen elements or entries.
|
static java.lang.Object[] |
freeze(java.util.Collection set,
int size)
Provide a frozen array of elements from a Set.
|
static java.util.Map.Entry[] |
freeze(java.util.Map map,
int size)
Provide a frozen array of elements from the entrySet of a Map.
|
static java.util.Iterator |
frozenIterator(java.util.Map map,
int size)
Provide a frozen iterator of elements from the entrySet of a Map.
|
static void |
printElements(java.io.PrintStream p,
java.lang.String s,
java.lang.Object[] elements)
For debugging, print the contents of a frozen collection.
|
static void |
printEntries(java.io.PrintStream p,
java.lang.String s,
java.util.Map.Entry[] entries)
For debugging, print the contents of a frozen entrySet.
|
static java.lang.Object[] |
thaw(SCOCollection sco,
StateManagerInternal owner,
java.lang.Object[] frozenElements)
Thaw the frozen elements of a collection.
|
static java.util.Map.Entry[] |
thaw(SCOMap map,
StateManagerInternal owner,
java.util.Map.Entry[] frozenEntries)
Thaw the frozen elements of a map.
|
protected Freezer()
public static java.lang.Object[] freeze(java.util.Collection set, int size)
size
- the number of elements in the collection.set
- the Set whose elements are to be ordered.public static java.util.Map.Entry[] freeze(java.util.Map map, int size)
size
- the number of entries in the map.map
- the Map whose entrySet elements are to be calculated.public static java.util.Iterator frozenIterator(java.util.Map map, int size)
size
- the number of entries in the map.map
- the Map whose entrySet elements are to be calculated.public static java.util.Map createAbsoluteOrderMap()
public static java.util.Iterator createFrozenIterator(java.lang.Object[] frozen)
frozen
- the array of frozen entries or elements.public static java.util.Map.Entry[] thaw(SCOMap map, StateManagerInternal owner, java.util.Map.Entry[] frozenEntries)
map
- the Map to be thawed.owner
- the StateManager that owns this Map.frozenEntries
- the frozen entries to be thawed.public static java.lang.Object[] thaw(SCOCollection sco, StateManagerInternal owner, java.lang.Object[] frozenElements)
sco
- the frozen collection to be thawed.owner
- the StateManager that owns this collection.frozenElements
- the elements to be thawed.public static void printEntries(java.io.PrintStream p, java.lang.String s, java.util.Map.Entry[] entries)
p
- where to write the output.s
- an identifying string.entries
- the Map.Entry[] to print.public static void printElements(java.io.PrintStream p, java.lang.String s, java.lang.Object[] elements)
p
- where to write the output.s
- an identifying string.elements
- the Object[] to print.Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.