Class SimpleFastUpdateableUserIndex<U>
java.lang.Object
es.uam.eps.ir.ranksys.fast.index.SimpleFastUserIndex<U>
es.uam.eps.ir.relison.links.data.updateable.index.fast.SimpleFastUpdateableUserIndex<U>
- Type Parameters:
U
- type of the users
- All Implemented Interfaces:
es.uam.eps.ir.ranksys.core.index.UserIndex<U>
,es.uam.eps.ir.ranksys.fast.index.FastUserIndex<U>
,FastUpdateableUserIndex<U>
,UpdateableUserIndex<U>
,java.io.Serializable
public class SimpleFastUpdateableUserIndex<U> extends es.uam.eps.ir.ranksys.fast.index.SimpleFastUserIndex<U> implements FastUpdateableUserIndex<U>
Simple implementation of FastUpdateableUserIndex backed by a bi-map IdxIndex
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description SimpleFastUpdateableUserIndex()
-
Method Summary
Modifier and Type Method Description int
addUser(U u)
Adds a user to the index.static <U> SimpleFastUpdateableUserIndex<U>
load(java.util.stream.Stream<U> users)
Creates a user index from a stream of user objects.Methods inherited from class es.uam.eps.ir.ranksys.fast.index.SimpleFastUserIndex
add, containsUser, getAllUsers, numUsers, uidx2user, user2uidx
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.uam.eps.ir.relison.links.data.updateable.index.fast.FastUpdateableUserIndex
getAllUsers
Methods inherited from interface es.uam.eps.ir.ranksys.fast.index.FastUserIndex
containsUser, getAllUidx, uidx2user, uidx2user, uidx2user, user2uidx, user2uidx, user2uidx
Methods inherited from interface es.uam.eps.ir.relison.links.data.updateable.index.UpdateableUserIndex
addUsers
-
Constructor Details
-
SimpleFastUpdateableUserIndex
public SimpleFastUpdateableUserIndex()
-
-
Method Details
-
addUser
Description copied from interface:UpdateableUserIndex
Adds a user to the index.- Specified by:
addUser
in interfaceUpdateableUserIndex<U>
- Parameters:
u
- the user.- Returns:
- the identifier of the new user.
-
load
Creates a user index from a stream of user objects.- Type Parameters:
U
- type of the users- Parameters:
users
- stream of user objects- Returns:
- a fast user index
-