code: public boolean isFinal(int height, long blockTimeSeconds) {
          long time = getLockTime();
          return time < (time < LOCKTIME_THRESHOLD ? height : blockTimeSeconds) || !isTimeLocked();
      }
docs: <p>Returns true if this transaction is considered finalized and can be placed in a block. Non-finalized
  transactions won't be included by miners and can be replaced with newer versions using sequence numbers.
  This is useful in certain types of <a href="http://en.bitcoin.it/wiki/Contracts">contracts</a>, such as
  micropayment channels.</p>
  
  <p>Note that currently the replacement feature is disabled in Bitcoin Core and will need to be
  re-activated before this functionality is useful.</p>