コード例 #1
0
 @Override
 public boolean equals(Object obj) {
   if (!(obj instanceof TerminalPosition)) {
     return false;
   }
   TerminalPosition otherPosition = (TerminalPosition) obj;
   return new EqualsBuilder()
       .append(getRow(), otherPosition.getRow())
       .append(getColumn(), otherPosition.getColumn())
       .isEquals();
 }
コード例 #2
0
  public void setCursorPosition(TerminalPosition cursorPosition) {
    if (cursorPosition == null) {
      return;
    }

    // use an XML serialization position
    TerminalPositionBean newCursorPosition = new TerminalPositionBean();
    newCursorPosition.setRow(cursorPosition.getRow());
    newCursorPosition.setColumn(cursorPosition.getColumn());
    this.cursorPosition = newCursorPosition;
  }
コード例 #3
0
 public static TerminalPositionBean newInstance(TerminalPosition position) {
   TerminalPositionBean newPosition = new TerminalPositionBean();
   newPosition.setRow(position.getRow());
   newPosition.setColumn(position.getColumn());
   return newPosition;
 }