private Formula constructClause ( final LinkedHashSet < Literal > literals ) { if ( literals . isEmpty ( ) ) return this . falsum ( ) ; if ( literals . size ( ) == 1 ) return literals . iterator ( ) . next ( ) ; Map < LinkedHashSet < ? extends Formula > , Or > opOrMap = this . orsN ; switch ( literals . size ( ) ) { case 2 : opOrMap = this . ors2 ; break ; case 3 : opOrMap = this . ors3 ; break ; case 4 : opOrMap = this . ors4 ; break ; default : break ; } Or tempOr = opOrMap . get ( literals ) ; if ( tempOr != null ) return tempOr ; tempOr = new Or ( literals , this , true ) ; opOrMap . put ( literals , tempOr ) ; return tempOr ; }
Creates a new clause .