net.sourceforge.geeboss.model.midi.memory
Class MemoryMap

java.lang.Object
  extended by net.sourceforge.geeboss.model.midi.memory.MemoryMap

public class MemoryMap
extends java.lang.Object

This class allows associating a MemoryComponents to address areas

Author:
Frederic BORRY

Nested Class Summary
static class MemoryMap.MemoryArea
          A memory area specified by a base address and a size
 
Constructor Summary
MemoryMap()
          Create a new empty MemoryMap
 
Method Summary
 void add(MemoryComponent component)
          Add a MemoryComponent to this map
 MemoryComponent get(long address)
          Get the MemoryComponent mapped to the specified address
 MemoryComponent get(java.lang.String name)
          Get the MemoryComponent given it's name
 java.util.Collection<MemoryComponent> getMemoryComponents()
          Returns component collection sorted in memory order
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryMap

public MemoryMap()
Create a new empty MemoryMap

Method Detail

add

public void add(MemoryComponent component)
Add a MemoryComponent to this map

Parameters:
component - the component to add

get

public MemoryComponent get(long address)
Get the MemoryComponent mapped to the specified address

Parameters:
address - the address
Returns:
the MemoryComponent mapped to the specified address or null if none was found

get

public MemoryComponent get(java.lang.String name)
Get the MemoryComponent given it's name

Parameters:
name - the name
Returns:
the MemoryComponent associated to the given name or null if none was found

getMemoryComponents

public java.util.Collection<MemoryComponent> getMemoryComponents()
Returns component collection sorted in memory order

Returns:
component collection sorted in memory order


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.