* Slot's are used to store and retrieve data in the transaction's State object.\r
*/\r
public final class Slot {\r
- \r
- /*\r
- * The name of the Slot.\r
- */\r
- private final String key;\r
- \r
- /*\r
- * The index of the State's local map associated with this Slot.\r
- */\r
- final int slot; \r
- \r
- /**\r
- * Constructs a new Slot.\r
- * \r
- * @param index\r
- * The index of State's local map this Slot is associated with.\r
- * @param name\r
- * The name of the Slot's key.\r
- */\r
- Slot(int index, String name) {\r
- slot = index;\r
- key = name;\r
- }\r
- \r
- /**\r
- * Debug method only to print key=slot pairs.\r
- */\r
- public String toString() {\r
- return key + '=' + slot;\r
- }\r
- \r
- /**\r
- * Returns the name of this Slot's key.\r
- * \r
- * @return\r
- * The name of this Slot's key.\r
- */\r
- public String getKey() {\r
- return key;\r
- }\r
- \r
- /**\r
- * Put an Object into the slot on the State\r
- * @param state\r
- * @param obj\r
- */\r
- public void put(Object[] state, Object obj) {\r
- state[slot]=obj;\r
- }\r
+ \r
+ /*\r
+ * The name of the Slot.\r
+ */\r
+ private final String key;\r
+ \r
+ /*\r
+ * The index of the State's local map associated with this Slot.\r
+ */\r
+ final int slot; \r
+ \r
+ /**\r
+ * Constructs a new Slot.\r
+ * \r
+ * @param index\r
+ * The index of State's local map this Slot is associated with.\r
+ * @param name\r
+ * The name of the Slot's key.\r
+ */\r
+ public Slot(int index, String name) {\r
+ slot = index;\r
+ key = name;\r
+ }\r
+ \r
+ /**\r
+ * Debug method only to print key=slot pairs.\r
+ */\r
+ public String toString() {\r
+ return key + '=' + slot;\r
+ }\r
+ \r
+ /**\r
+ * Returns the name of this Slot's key.\r
+ * \r
+ * @return\r
+ * The name of this Slot's key.\r
+ */\r
+ public String getKey() {\r
+ return key;\r
+ }\r
+ \r
+ /**\r
+ * Put an Object into the slot on the State\r
+ * @param state\r
+ * @param obj\r
+ */\r
+ public void put(Object[] state, Object obj) {\r
+ state[slot]=obj;\r
+ }\r
\r
- /**\r
- * Get an Object from the slot on the State\r
- * @param state\r
- * @param obj\r
- */\r
- public Object get(Object[] state) {\r
- return state[slot];\r
- }\r
+ /**\r
+ * Get an Object from the slot on the State\r
+ * @param state\r
+ * @param obj\r
+ */\r
+ public Object get(Object[] state) {\r
+ return state[slot];\r
+ }\r
\r
}\r