📄 bitencodedfileinfo.java
字号:
import java.util.BitSet;
/**
* @author Michal
*
*/
public class BitEncodedFileInfo
{
private String fileName;
private BitSet bitSet;
public int index;
/**
*
* @param fName file name
* @param tableSize size of xml paths table
* @param ind index in table to set to 1
*/
public BitEncodedFileInfo(String fName, int ind)
{
fileName=fName;
index = ind;
bitSet= new BitSet();
bitSet.clear();
bitSet.set(ind);
}
/**
* Default constructor
* @param fName file name
* @param tableSize size of xml paths table
*/
public BitEncodedFileInfo(String fName)
{
fileName=fName;
bitSet= new BitSet();
bitSet.clear();
}
/**
*
* @param bitValue value of the bit to set
* @param bitToSet index in table to set
*/
public void SetBit(int bitToSet)
{
bitSet.set(bitToSet);
}
public BitSet GetBits()
{
return bitSet;
}
public String GetBitsAsString()
{
return bitSet.toString();
}
public String print()
{
return (fileName + bitSet.toString());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -