/*
 * Copyright 2016 Bahman Movaqar
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ojlang.sysdef.impls;

import lombok.val;
import org.ojlang.sysdef.*;

/**
 * @see Systat
 * @author Bahman Movaqar [Bahman AT BahmanM.com]
 */
public class OjSystat implements Systat {

  final static private long serialVersionUID = -4885444008905872758L;

  private Mem mem;
  private Dict dict;
  private RS rs;
  private PS ps;
  private int xp;
  private int sysMemSize;

  private OjSystat() {}

  /**
   * Creates a system execution state.
   *
   * @param mem system memory
   * @param dict system dictionary
   * @param rs system return stack
   * @param ps system parameter stack
   * @param xp system execution pointer
   * @param sysMemSize system memory size
   * @return a system execution state
   */
  static public OjSystat
  create(
    Mem mem, Dict dict, RS rs, PS ps,
    int xp, int sysMemSize
  ) {
    val result = new OjSystat();
    result.mem = mem;
    result.dict = dict;
    result.ps = ps;
    result.rs = rs;
    result.xp = xp;
    result.sysMemSize = sysMemSize;
    return result;
  }

  @Override
  public Mem mem() {
    return mem;
  }

  @Override
  public Dict dict() {
    return dict;
  }

  @Override
  public RS rs() {
    return rs;
  }

  @Override
  public PS ps() {
    return ps;
  }

  @Override
  public int xp() {
    return xp;
  }

  @Override
  public int sysMemSize() {
    return sysMemSize;
  }

  @Override
  public OjSystat
  xp(
    int newXp
  ) {
    xp = newXp;
    return this;
  }

}

@@ -625,16 +625,98 @@
 impls;%0A%0A
+import lombok.Getter;%0Aimport lombok.Setter;%0Aimport lombok.experimental.Accessors;%0A
 import l
@@ -828,16 +828,56 @@
 om%5D%0A */%0A
+@Accessors(fluent = true, chain = true)%0A
 public c
@@ -988,97 +988,210 @@
 %0A%0A  
-private Mem mem;%0A  private Dict dict;%0A  private RS rs;%0A  private PS ps;%0A  private int xp;
+@Getter @Setter%0A  private Mem mem;%0A%0A  @Getter @Setter%0A  private Dict dict;%0A%0A  @Getter @Setter%0A  private RS rs;%0A%0A  @Getter @Setter%0A  private PS ps;%0A%0A  @Getter @Setter%0A  private int xp;%0A%0A  @Getter @Setter
 %0A  p
@@ -1862,433 +1862,6 @@
  %7D%0A%0A
-  @Override%0A  public Mem mem() %7B%0A    return mem;%0A  %7D%0A%0A  @Override%0A  public Dict dict() %7B%0A    return dict;%0A  %7D%0A%0A  @Override%0A  public RS rs() %7B%0A    return rs;%0A  %7D%0A%0A  @Override%0A  public PS ps() %7B%0A    return ps;%0A  %7D%0A%0A  @Override%0A  public int xp() %7B%0A    return xp;%0A  %7D%0A%0A  @Override%0A  public int sysMemSize() %7B%0A    return sysMemSize;%0A  %7D%0A%0A  @Override%0A  public OjSystat%0A  xp(%0A    int newXp%0A  ) %7B%0A    xp = newXp;%0A    return this;%0A  %7D%0A%0A
 %7D%0A

use lombok