org.compass.core.mapping
Class AbstractMultipleMapping
java.lang.Object
org.compass.core.mapping.AbstractMapping
org.compass.core.mapping.AbstractMultipleMapping
- All Implemented Interfaces:
- Mapping, MultipleMapping
- Direct Known Subclasses:
- AbstractAccessorMultipleMapping, AbstractResourceMapping, ContractMapping
public abstract class AbstractMultipleMapping
- extends AbstractMapping
- implements MultipleMapping
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mappings
protected ArrayList mappings
mappingsByNameMap
protected HashMap mappingsByNameMap
AbstractMultipleMapping
public AbstractMultipleMapping()
removeExistingByName
public void removeExistingByName(Mapping mapping)
addMapping
public int addMapping(Mapping mapping)
- Description copied from interface:
MultipleMapping
- Adds the mapping. Returns the location that the mapping was added to.
- Specified by:
addMapping in interface MultipleMapping
- Parameters:
mapping - The mapping to add
- Returns:
- The location the mapping was added to.
addMappings
public void addMappings(MultipleMapping mapping)
replaceMappings
public void replaceMappings(MultipleMapping mapping)
mappingsIt
public Iterator mappingsIt()
- Description copied from interface:
MultipleMapping
- Returns an iterator over the stored mappings.
- Specified by:
mappingsIt in interface MultipleMapping
mappingsSize
public int mappingsSize()
getMapping
public Mapping getMapping(String name)
- Description copied from interface:
MultipleMapping
- Returns the mapping associated with the given name. Don't be confused with
Mapping.getName(), since the mappings might be saved not under the mapping
name (it might be under the mapping path). It really depends on the actual
implementation.
- Specified by:
getMapping in interface MultipleMapping
- Parameters:
name - The name tha mapping was registered under when it was added.
- Returns:
- The mapping found, or
null if nothing was found.
getMapping
public Mapping getMapping(int index)
- Description copied from interface:
MultipleMapping
- Returns the mapping at the given index.
- Specified by:
getMapping in interface MultipleMapping
clearMappings
public void clearMappings()
copy
protected void copy(MultipleMapping mapping)
shallowCopy
protected void shallowCopy(MultipleMapping mapping)
Copyright (c) 2004-2008 The Compass Project.