org.apache.jackrabbit.core.query.lucene.join
Class ScoreNodeMap
java.lang.Object
org.apache.jackrabbit.core.query.lucene.join.ScoreNodeMap
public final class ScoreNodeMap
- extends Object
ScoreNodeMap
implements a simple mapping of an arbitrary key
to an array of ScoreNode[]
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScoreNodeMap
public ScoreNodeMap()
addScoreNodes
public void addScoreNodes(Object key,
ScoreNode[] nodes)
- Adds
scoreNodes
to this map under the given key
.
If there already exists a mapping with the given key
the
scoreNodes
are added to the existingmapping. The add
operation works as follows:
- If the existing value for
key
is a ScoreNode[]
,
then the value is turned into a List
and the exising value
as well as the new value are added to the List
. Finally
the List
is uses as the new value for the mapping.
- If the existing value for
key
is a List
the
scoreNodes
are simply added to the List
.
- Parameters:
key
- the lookup key.nodes
- the score nodes.
getScoreNodes
public ScoreNode[][] getScoreNodes(Object key)
- Returns an array of
ScoreNode[]
for the given
key
.
- Parameters:
key
- the key.
- Returns:
- an array of
ScoreNode[]
that match the given
key
or null
if there is none.
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.