Package com.puzzlebazar.shared

Examples of com.puzzlebazar.shared.InvalidObjectException


  public void attachToPuzzleDetails(HeyawakePuzzleDetails puzzleDetails)
      throws InvalidObjectException, ObjectAlreadyInitializedException  {
    super.attachToPuzzleDetails(puzzleDetails);

    if (getWidth() <= 0 || getHeight() <= 0) {
      throw new InvalidObjectException("HeyawakePuzzleDetails has an invalid width or height.");
    }

    if (rooms == null) {
      rooms = new ArrayList<HeyawakeRoom>();
    }
    if (stateArray == null) {
      stateArray = new HeyawakeCellState[getWidth()][getHeight()];
    } else if (stateArray.length != getWidth() ||
          stateArray[0].length != getWidth()) {
      throw new InvalidObjectException("Width or height of HeyawakePuzzle doesn't match that of HeyawakePuzzleDetails");
    }
  }
View Full Code Here


      throw new ObjectAlreadyInitializedException("PuzzleDetails already set in PuzzleImpl.");
    }
    if (puzzleDetailsKey == null) {
      puzzleDetailsKey = (Key<D>) puzzleDetails.createKey();
    } else if (puzzleDetails.getId() != puzzleDetailsKey.getId()) {
      throw new InvalidObjectException("PuzzleDetails id doesn't match the one in PuzzleImpl.");
    }
    this.puzzleDetails = puzzleDetails;
  }
View Full Code Here

      throw new ObjectAlreadyInitializedException("PuzzleInfo already set in PuzzleDetailsImpl.");
    }
    if (puzzleInfoKey == null) {
      puzzleInfoKey = puzzleInfo.createKey();
    } else if (puzzleInfo.getId() != puzzleInfoKey.getId()) {
      throw new InvalidObjectException("PuzzleInfo id doesn't match the one in PuzzleDetailsImpl.");
    }

    this.puzzleInfo = puzzleInfo;
  }
View Full Code Here

TOP

Related Classes of com.puzzlebazar.shared.InvalidObjectException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.