
org.factcenter.pathORam.Bucket Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of inchworm Show documentation
Show all versions of inchworm Show documentation
Secure computation, one step at a time.
The newest version!
package org.factcenter.pathORam;
import java.util.List;
/**
* @author mikegarts
*
*/
public class Bucket
{
private final int size;
private List blocks;
/**
* @return true if the Bucket is full
*/
public boolean isFull()
{
return getBlocks().size() >= size;
}
/**
* @param size size of the bucket
* @param blocks container of blocks
*/
public Bucket(int size, List blocks)
{
this.size = size;
this.setBlocks(blocks);
}
/**
* @param dummyBlockSize fill block with dummies of dummyBlockSize each
*/
public void fillDummies(int dummyBlockSize)
{
for (int i = getBlocks().size() ; i < size ; i++)
{
getBlocks().add(Block.createDummy(dummyBlockSize));
}
}
/**
* @return blocks container
*/
public List getBlocks() {
return blocks;
}
private void setBlocks(List blocks) {
this.blocks = blocks;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy