erkka
Class Rules

java.lang.Object
  |
  +--erkka.Rules

public class Rules
extends java.lang.Object

Title: Erkka-Projekti

Description: Defines how objects can join together

Copyright: Copyright (c) 2002

Company: Erkka

Version:
1.0

Constructor Summary
Rules(java.util.Vector Lines)
           
 
Method Summary
 void addNewRule(java.lang.String sName, java.lang.String friendName, java.lang.String max)
          This function adds new rule how two objects can join together
 boolean canJoin(erkka.Symbol target1, erkka.Symbol target2)
          This function checks if two objects can join together.
 int checkConnectionCount(java.lang.String sName, int sId)
          this function checks how many object have already joined to desired component it returns counter which include how many objects have joined desired component
 boolean isJoinOK(java.lang.String c1, int c1Id, java.lang.String c2)
          this function checks if object can join together.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rules

public Rules(java.util.Vector Lines)
Method Detail

canJoin

public boolean canJoin(erkka.Symbol target1,
                       erkka.Symbol target2)
This function checks if two objects can join together. If true is return then these object can join and if false then objects can't join together


isJoinOK

public boolean isJoinOK(java.lang.String c1,
                        int c1Id,
                        java.lang.String c2)
this function checks if object can join together.


checkConnectionCount

public int checkConnectionCount(java.lang.String sName,
                                int sId)
this function checks how many object have already joined to desired component it returns counter which include how many objects have joined desired component


addNewRule

public void addNewRule(java.lang.String sName,
                       java.lang.String friendName,
                       java.lang.String max)
This function adds new rule how two objects can join together