コード例 #1
0
  public StatementBundle getFirstStatement(StatementBundleConfiguration config) {
    if (!configurations.containsKey(config)) return (null);

    Vector statmnts = (Vector) configurations.get(config);
    if (statmnts.size() > 0) return ((StatementBundle) statmnts.get(0));
    else return (null);
  }
コード例 #2
0
  public StatementBundle addStatement(StatementBundleConfiguration config) {
    StatementBundle sb1 = config.getStatementBundle();

    StatementBundle sb = (StatementBundle) sb1.clone(false);
    statements.put(sb, config);
    sortedStatements.add(sb);
    if (!configurations.containsKey(config)) addConfiguration(config);

    Vector stments = (Vector) configurations.get(config);
    stments.add(sb);
    return (sb);
  }
コード例 #3
0
 public boolean isComplete(StatementBundleConfiguration config) {
   if (configurations.containsKey(config)) {
     Vector statements = (Vector) configurations.get(config);
     Iterator it = statements.iterator();
     int count = 0;
     while (it.hasNext()) {
       count++;
       if (!((StatementBundle) it.next()).isComplete()) return (false);
     }
     if (count > 0) return (true);
     else return (false);
   } else return (false);
 }
コード例 #4
0
 public StatementBundleConfiguration getConfiguration(StatementBundle statement) {
   if (!statements.containsKey(statement)) return (null);
   else return ((StatementBundleConfiguration) statements.get(statement));
 }
コード例 #5
0
 public Vector getStatements(StatementBundleConfiguration config) {
   if (!configurations.containsKey(config)) ;
   addConfiguration(config);
   return ((Vector) configurations.get(config));
 }
コード例 #6
0
 public void addConfiguration(StatementBundleConfiguration config) {
   if (!configurations.containsKey(config)) configurations.put(config, new Vector());
 }
コード例 #7
0
 public boolean contains(StatementBundleConfiguration config) {
   return (configurations.containsKey(config));
 }