コード例 #1
0
  public int countOfferedValues() {
    // Return the number of values being offered in object tokens.

    int count = 0;
    OfferList offers = this.offers;
    for (int i = 0; i < offers.size(); i++) {
      count = count + offers.getValue(i).countOfferedValues();
    }

    return count;
  } // countOfferedValues
コード例 #2
0
  public fUML.Semantics.Activities.IntermediateActivities.TokenList getOfferedTokens() {
    // Get the offered tokens (after which the tokens will still be
    // offered).

    TokenList tokens = new TokenList();
    OfferList offers = this.offers;

    for (int i = 0; i < offers.size(); i++) {
      TokenList offeredTokens = offers.getValue(i).getOfferedTokens();
      for (int j = 0; j < offeredTokens.size(); j++) {
        tokens.addValue(offeredTokens.getValue(j));
      }
    }

    return tokens;
  } // getOfferedTokens