|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.malai.mapping.List2ObjectMapping<E,F>
E
- The type of the source element, contained in a list, of the mapping.F
- The type of the target element of the mapping.public abstract class List2ObjectMapping<E,F>
Defines a mapping established between a list and an object.
This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN
Malai is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
01/19/2012
Field Summary | |
---|---|
protected java.util.List<E> |
source
The source list. |
protected F |
target
The target object. |
Constructor Summary | |
---|---|
List2ObjectMapping(java.util.List<E> source,
F target)
Creates the mapping. |
Method Summary | |
---|---|
void |
clear()
Removes the references of the mapped objects of the mapping to avoid memory leaks. |
java.util.List<E> |
getSource()
Returns the source object of the mapping. |
F |
getTarget()
Returns the target object of the mapping. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.malai.mapping.IMapping |
---|
init, onListCleaned, onObjectAdded, onObjectModified, onObjectMoved, onObjectRemoved, onObjectReplaced |
Field Detail |
---|
protected java.util.List<E> source
protected F target
Constructor Detail |
---|
public List2ObjectMapping(java.util.List<E> source, F target)
source
- The source list.target
- The target object.
java.lang.IllegalArgumentException
- If one of the given elements is null or if they are the same object.Method Detail |
---|
public java.util.List<E> getSource()
IMapping
getSource
in interface IMapping
public F getTarget()
IMapping
getTarget
in interface IMapping
public void clear()
IMapping
clear
in interface IMapping
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |