1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2024-12-27 01:13:31 +01:00

BucketListの些細な改良

This commit is contained in:
tateisu 2017-05-10 09:55:58 +09:00
parent 124a9520fd
commit 5343c6e44c

View File

@ -150,14 +150,22 @@ public class BucketList < E >
bucket.addAll( c );
groups.add( pos.group_index, bucket );
}
updateIndex();
return true;
}
public E remove( int index ){
BucketPos pos = findPos( pos_internal.get(), index );
Bucket< E > bucket = groups.get( pos.group_index );
E data = bucket.remove( pos.bucket_index );
if( bucket.isEmpty() ){
groups.remove( pos.group_index );
}
updateIndex();
return data;
}