Class Beacon.Memory
- java.lang.Object
 - 
- edu.ubo.satellitebeacons.main.movable.Beacon.Memory
 
 
- 
- Enclosing class:
 - Beacon
 
public class Beacon.Memory extends java.lang.ObjectMemory of the beacon. 
- 
- 
Constructor Summary
Constructors Constructor Description Memory(int capacity)Create a new memory with the given capacity. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int i)Add things to the memory.voidclean()Clean the memory by remove everything on it.booleanisEmpty()Test if the memory is empty.booleanisFull()Test if the memory is full.intremove(int i)Remove things to the memory. 
 - 
 
- 
- 
Method Detail
- 
add
public void add(int i)
Add things to the memory.- Parameters:
 i- Size of the things to be added.
 
- 
remove
public int remove(int i)
Remove things to the memory.- Parameters:
 i- Size of the things to remove.- Returns:
 - Size of removed resources.
 
 
- 
clean
public void clean()
Clean the memory by remove everything on it. 
- 
isFull
public boolean isFull()
Test if the memory is full.- Returns:
 - true if the memory is full otherwise false.
 
 
- 
isEmpty
public boolean isEmpty()
Test if the memory is empty.- Returns:
 - true if the memory is empty otherwise false.
 
 
 - 
 
 -