examples/src/main/java/io/github/agentsoz/jill/example/greeter/Greeter.java
private void registerNeighbours(Random rand, int count) throws BeliefBaseException {
    int size = (count < 0) ? 0 : count;
    for (int i = 0; i < size; i++) {
      boolean male = (rand.nextDouble() < 0.5) ? true : false;
      this.addBelief(beliefset, buildName(male), male ? "male" : "female");
    }
  }
private void registerNeighbours(Random rand, int count) throws BeliefBaseException {
    int size = (count < 0) ? 0 : count;
    for (int i = 0; i < size; i++) {
      boolean male = (rand.nextDouble() < 0.5) ? true : false;
      this.addBelief(beliefset, buildName(male), male ? "male" : "female");
    }
  }
private void registerNeighbours ( Random rand , int count ) throws BeliefBaseException { int size = ( count < 0 ) ? 0 : count ; for ( int i = 0 ; i < size ; i ++ ) { boolean male = ( rand . nextDouble ( ) < 0.5 ) ? true : false ; this . addBelief ( beliefset , buildName ( male ) , male ? "male" : "female" ) ; } }
Helper function to add beliefs about neighbours.

@param rand random number generator to use
@param count number of beliefs to add
@throws BeliefBaseException thrown if there is a belief base access error
Helper function to add beliefs about neighbours .