zxing-js/library

View on GitHub
src/core/oned/rss/expanded/decoders/BlockParsedResult.ts

Summary

Maintainability
A
0 mins
Test Coverage
F
40%
import DecodedInformation from './DecodedInformation';

export default class BlockParsedResult {

  private readonly decodedInformation: DecodedInformation;
  private readonly finished: boolean;

  constructor(finished: boolean, decodedInformation?: DecodedInformation) {
    if (decodedInformation) {
      this.decodedInformation = null;
    } else {
      this.finished = finished;
      this.decodedInformation = decodedInformation;
    }
  }

  getDecodedInformation(): DecodedInformation {
    return this.decodedInformation;
  }

  isFinished(): boolean {
    return this.finished;
  }

}