it.unimi.dsi.bits
Class Utf16TransformationStrategy

java.lang.Object
  extended by it.unimi.dsi.bits.Utf16TransformationStrategy
All Implemented Interfaces:
TransformationStrategy<CharSequence>, Serializable

Deprecated. Use TransformationStrategies.utf16() and TransformationStrategies.prefixFreeUtf16().

@Deprecated
public class Utf16TransformationStrategy
extends Object
implements TransformationStrategy<CharSequence>, Serializable

See Also:
Serialized Form

Constructor Summary
Utf16TransformationStrategy()
          Deprecated. Creates a prefix-free UTF16 transformation strategy.
 
Method Summary
 TransformationStrategy<CharSequence> copy()
          Deprecated. Returns a copy of this transformation strategy.
 long length(CharSequence s)
          Deprecated. Returns the length of the bit vector that would be computed by TransformationStrategy.toBitVector(Object).
 long numBits()
          Deprecated. The (approximate) number of bits occupied by this transformation.
 BitVector toBitVector(CharSequence s)
          Deprecated. Returns a bit vector representation of the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utf16TransformationStrategy

public Utf16TransformationStrategy()
Deprecated. 
Creates a prefix-free UTF16 transformation strategy. The strategy will map a string to its natural UTF16 bit sequence, and the resulting set of binary words will be made prefix free by adding

Method Detail

length

public long length(CharSequence s)
Deprecated. 
Description copied from interface: TransformationStrategy
Returns the length of the bit vector that would be computed by TransformationStrategy.toBitVector(Object).

The raison d'être of this method is that it is often easy to know the length of the representation without actually computing the representation.

Specified by:
length in interface TransformationStrategy<CharSequence>
Parameters:
s - the object whose representation length is to be known.
Returns:
the length of the bit-vector representation of object (the one that would be returned by TransformationStrategy.toBitVector(Object)).

toBitVector

public BitVector toBitVector(CharSequence s)
Deprecated. 
Description copied from interface: TransformationStrategy
Returns a bit vector representation of the given object.

Specified by:
toBitVector in interface TransformationStrategy<CharSequence>
Parameters:
s - the object to be turned into a bit-vector representation.
Returns:
a bit-vector representation of object.

numBits

public long numBits()
Deprecated. 
Description copied from interface: TransformationStrategy
The (approximate) number of bits occupied by this transformation.

Specified by:
numBits in interface TransformationStrategy<CharSequence>
Returns:
the (approximate) number of bits occupied by this transformation.

copy

public TransformationStrategy<CharSequence> copy()
Deprecated. 
Description copied from interface: TransformationStrategy
Returns a copy of this transformation strategy.

Specified by:
copy in interface TransformationStrategy<CharSequence>
Returns:
a copy of this transformation strategy.