Examples of State


Examples of com.l2jfrozen.gameserver.model.quest.State

  private static String qn = "8008_Engrave";

  public EngraveQuest()
  {
    super(8008, qn, "Engrave");
    setInitialState(new State("Start", this));
    if(PowerPakConfig.SPAWN_ENGRAVER)
    {
      addSpawn(50018, PowerPakConfig.ENGRAVER_X, PowerPakConfig.ENGRAVER_Y, PowerPakConfig.ENGRAVER_Z, 0, false, 0);
      System.out.println("...spawned engraver");
    }
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.id.State

    throws Exception {

    AuthorizationCode code = new AuthorizationCode();

    AuthenticationSuccessResponse response = new AuthenticationSuccessResponse(
      REDIRECT_URI, code, null, null, new State("abc"));

    assertEquals(REDIRECT_URI, response.getRedirectionURI());
    assertNull(response.getIDToken());
    assertEquals(code, response.getAuthorizationCode());
    assertNull(response.getAccessToken());
View Full Code Here

Examples of com.nr.model.State

        t += gdev2.dev();
      }
      times[i]=t;
    }

    State s=new State(1.0,3.0,100.0,1,1);
    Plog plog = new Plog(times);
    Proposal propose = new Proposal(10102,0.01);
    for (i=0;i<1000;i++) {    // Burn-in
//      if (i%10 == 0)
//        System.out.printf(s.lam1 << " %f\n", s.lam2 << " %f\n", s.k1 << " %f\n", s.k2 << " %f\n", s.tc);
View Full Code Here

Examples of com.oltpbenchmark.types.State

        throw new RuntimeException("Unexpected error when initializing " + this.getName(), ex);
    }
   
    // wait for start
    testState.blockForStart();
    State state = testState.getState();
   
    TransactionType invalidTT = TransactionType.INVALID;
    assert(invalidTT != null);
   
    while (true) {
View Full Code Here

Examples of com.onpositive.gae.baseviewer.Request.State

        }, new Callback() {

          public boolean objectFetched(Object object) {
            if (object instanceof State) {
              State c = (State) object;
              completed = c.completed;
            } else {
              results.add(object);
            }
            return false;
View Full Code Here

Examples of com.opensymphony.module.sitemesh.html.State

    public Page parse(char[] data) throws IOException {
        CharArray head = new CharArray(64);
        CharArray body = new CharArray(4096);
        GrailsTokenizedHTMLPage page = new GrailsTokenizedHTMLPage(data, body, head);
        HTMLProcessor processor = new HTMLProcessor(data, body);
        State html = processor.defaultState();

        // Core rules for SiteMesh to be functional.
        html.addRule(new HeadExtractingRule(head)); // contents of <head>
        html.addRule(new BodyTagRule(page, body)); // contents of <body>
        html.addRule(new TitleExtractingRule(page)); // the <title>
        html.addRule(new FramesetRule(page)); // if the page is a frameset

        // Additional rules - designed to be tweaked.
        addUserDefinedRules(html, page);

        processor.process();
View Full Code Here

Examples of com.poker.shared.State

    return serialized;
  }
 
  public static State unserializeState(String serialized) {
    try {
      State state=new State();
      String[] tokens = serialized.split("_");
      int turn = Integer.parseInt(tokens[0]);
      state.setPlayerTurn(turn);
      int process = Integer.parseInt(tokens[1]);
      state.setProcess(process);
      state.getPlayers().get(0).setBalance(Integer.parseInt(tokens[2]));
      state.getPlayers().get(1).setBalance(Integer.parseInt(tokens[3]));
      if (process >= 1) {
        ArrayList<Card> dealerCards = new ArrayList<Card>();
        ArrayList<Card> player1Cards = new ArrayList<Card>();
        ArrayList<Card> player2Cards = new ArrayList<Card>();
        for (int i = 4; i < 9;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);

          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          dealerCards.add(card);
          i += 2;
        }
        state.setDealerCards(dealerCards);
        for (int i = 10; i < 15;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);
          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          player1Cards.add(card);
          i += 2;
        }
        state.setPlayerCards(0, player1Cards);
        for (int i = 16; i < 21;) {
          Suit suit = Enum.valueOf(Suit.class, tokens[i]);
          Rank rank = Enum.valueOf(Rank.class, tokens[i + 1]);
          Card card = new Card(suit, rank);
          player2Cards.add(card);
          i += 2;
        }
        state.setPlayerCards(1, player2Cards);
        state.clearDesk();
        state.setDesk();
      }

      if (process == 2) {
        state.getPlayers().get(0).setChoose(Choose.valueOf(tokens[22]));
      }

      if (process == 3) {
        state.getPlayers().get(0).setChoose(Choose.valueOf(tokens[22]));
        state.getPlayers().get(1).setChoose(Choose.valueOf(tokens[23]));
      }

      if (process == 4) {
        state.getPlayers().get(0).setChoose(Choose.valueOf(tokens[22]));
        state.getPlayers().get(1).setChoose(Choose.valueOf(tokens[23]));
        state.getPlayers().get(0).setDecision(Decision.valueOf(tokens[24]));
        state.getPlayers().get(0).setResult(GameOver.Result.valueOf(tokens[25]));
      }

      if (process == 5) {
        state.getPlayers().get(0).setChoose(Choose.valueOf(tokens[22]));
        state.getPlayers().get(1).setChoose(Choose.valueOf(tokens[23]));
        state.getPlayers().get(0).setDecision(Decision.valueOf(tokens[24]));
        state.getPlayers().get(0).setResult(GameOver.Result.valueOf(tokens[25]));
        state.getPlayers().get(1).setDecision(Decision.valueOf(tokens[26]));
        state.getPlayers().get(1).setResult(GameOver.Result.valueOf(tokens[27]));
      }

      return state;
    } catch (StringIndexOutOfBoundsException e) {
      return new State();
    } catch (ArrayIndexOutOfBoundsException e) {
      return new State();
    }
  }
View Full Code Here

Examples of com.psddev.dari.db.State

            return false;
        }

        try {
            Draft draft = getOverlaidDraft(object);
            State state = State.getInstance(draft != null ? draft : object);

            state.as(Content.ObjectModification.class).setTrash(false);
            publish(state);
            redirectOnSave("");
            return true;

        } catch (Exception error) {
View Full Code Here

Examples of com.seaglasslookandfeel.state.State

                if (!State.isStandardStateName(s[i])) {

                    // this is a non-standard state name, so look for the
                    // custom state associated with it
                    String stateName   = prefix + "." + s[i];
                    State  customState = (State) myDefaults.get(stateName);

                    if (customState != null) {
                        states.add(customState);
                    }
                } else {
View Full Code Here

Examples of com.sos.scheduler.model.answers.State

  public State getState() {

    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::getState";
    State objState = null;
    objState = this.getAnswer().getState();
    objState.setParent(objFactory);
    return objState;
  } // private State getState
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.