public class EncodedValueOld extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
defaultValue |
protected double |
factor |
protected long |
mask |
protected long |
shift |
Constructor and Description |
---|
EncodedValueOld(String name,
int shift,
int bits,
double factor,
long defaultValue,
int maxValue)
Define a bit-encoded value
|
EncodedValueOld(String name,
int shift,
int bits,
double factor,
long defaultValue,
int maxValue,
boolean allowZero) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkValue(long value) |
int |
getBits() |
double |
getFactor() |
String |
getName() |
long |
getValue(long flags) |
long |
setDefaultValue(long flags) |
long |
setValue(long flags,
long value) |
protected final long shift
protected final long mask
protected final double factor
protected final long defaultValue
public EncodedValueOld(String name, int shift, int bits, double factor, long defaultValue, int maxValue)
name
- Description for debuggingshift
- bit index of this valuebits
- number of bits reservedfactor
- scaling factor for stored valuesdefaultValue
- default valuemaxValue
- default maximum valuepublic EncodedValueOld(String name, int shift, int bits, double factor, long defaultValue, int maxValue, boolean allowZero)
protected void checkValue(long value)
public long setValue(long flags, long value)
public String getName()
public long getValue(long flags)
public int getBits()
public double getFactor()
public long setDefaultValue(long flags)
Copyright © 2012–2019. All rights reserved.