private /*static*/ int getLiteral(int word)
  {
    if (isLiteral(word)) {
      return word;
    }

    if (simulateWAH) {
      return isZeroSequence(word) ? ConciseSetUtils.ALL_ZEROS_LITERAL : ConciseSetUtils.ALL_ONES_LITERAL;
    }

    // get bits from 30 to 26 and use them to set the corresponding bit
    // NOTE: "1 << (word >>> 25)" and "1 << ((word >>> 25) & 0x0000001F)" are equivalent
    // NOTE: ">>> 1" is required since 00000 represents no bits and 00001 the LSB bit set
    int literal = (1 << (word >>> 25)) >>> 1;
    return isZeroSequence(word)
           ? (ConciseSetUtils.ALL_ZEROS_LITERAL | literal)
           : (ConciseSetUtils.ALL_ONES_LITERAL & ~literal);
  }
private int getLiteral ( int word ) { if ( isLiteral ( word ) ) { return word ; } if ( simulateWAH ) { return isZeroSequence ( word ) ? ConciseSetUtils . ALL_ZEROS_LITERAL : ConciseSetUtils . ALL_ONES_LITERAL ; } int literal = ( 1 << ( word > > > 25 ) ) > > > 1 ; return isZeroSequence ( word ) ? ( ConciseSetUtils . ALL_ZEROS_LITERAL | literal ) : ( ConciseSetUtils . ALL_ONES_LITERAL & ~ literal ) ; }
Gets the literal word that represents the first 31 bits of the given the
word (i.e. the first block of a sequence word, or the bits of a literal word).
<p/>
If the word is a literal, it returns the unmodified word. In case of a
sequence, it returns a literal that represents the first 31 bits of the
given sequence word.

@param word word to check

@return the literal contained within the given word, <i>with the most
significant bit set to 1</i>.