📄 memory.java
字号:
package IrisRecog;
/**
* Memory.java
*
* Represents the memory of the agent, which is simply a vector of identities.
* The memory can be serialized (used to save memory to disk and load memory
* into an agent from disk).
*
* @author Team 6: Andy Bare, Imran Chaugule, Michael Huffman, Matt Pearson, Catherine Schell
* @version 1.0.0
*
* CSC 480 Section 2
* Fall 2005
* 10/1/05
*
*/
import java.util.*;
import java.io.*;
public class Memory extends Vector implements Serializable
{
/**
* Constructor creates a an empty memory.
*/
public Memory()
{
super();
}
/**
* Adds an identity to the memory.
*
* @param s The identity to add
*/
public void addIdentity(Identity s)
{
this.add(s);
}
/**
* Returns the identity from memory at the specified index.
*
* @param int The index
* @return the identity at the specified index
*/
public Identity getIdentity(int index)
{
return (Identity)this.get(index);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -